Re: `ls` shows file, `bash` says "No such file" ???
On Sun, 2014-05-04 at 00:49 +0200, Jörg-Volker Peetz wrote:
> I thought of the following scenario:
>
> $ touch x
> $ ln -s x firefox-bin
> $ rm x
>
> Now with this dangling link named firefox-bin try
>
> $ ls firefox-bin
> firefox-bin
>
> $ ./firefox-bin
> -bash: ./firefox-bin: No such file or directory
>
> That's what the OT described.
^^ :D, sorry I couldn't resist, I know that it's a typo
[rocketmouse@archlinux Desktop]$ touch x
[rocketmouse@archlinux Desktop]$ ln -s x firefox-bin
ln: failed to create symbolic link ‘firefox-bin’: File exists
[rocketmouse@archlinux Desktop]$ rm x
[rocketmouse@archlinux Desktop]$ ls firefox-bin
firefox-bin
[rocketmouse@archlinux Desktop]$ ./firefox-bin
bash: ./firefox-bin: No such file or directory
So far, so good. _But_ ...:
[rocketmouse@archlinux Desktop]$ ls -l
total 0
lrwxrwxrwx 1 rocketmouse rocketmouse 1 May 4 01:06 firefox-bin -> x
^^^^^^^^^^^^^^^^
The link is broken, but it's shown.
The first post of the OP includes this link:
http://forums.linuxmint.com/viewtopic.php?f=190&t=166506&p=855700#p855700
Take a look at this:
"$ ls -alh /usr/local/share/firefox-3.6.28/
total 20M
drwxr-xr-x 13 root staff 4.0K May 1 18:30 .
drwxrwsr-x 9 root staff 4.0K May 1 18:04 ..
-rw-r--r-- 1 root staff 2.1K Mar 6 2012 application.ini
-rw-r--r-- 1 root staff 0 Mar 6 2012 .autoreg
-rw-r--r-- 1 root staff 5.1K Mar 6 2012 blocklist.xml
-rw-r--r-- 1 root staff 232 Mar 6 2012 browserconfig.properties
drwxr-xr-x 3 root staff 4.0K Mar 6 2012 chrome
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 components
-rwxr-xr-x 1 root staff 51K Mar 6 2012 crashreporter
-rw-r--r-- 1 root staff 3.8K Mar 6 2012 crashreporter.ini
-rw-r--r-- 1 root staff 583 Mar 6 2012 crashreporter-override.ini
drwxr-xr-x 5 root staff 4.0K Mar 6 2012 defaults
-rw-r--r-- 1 root staff 136 Mar 6 2012 dependentlibs.list
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 dictionaries
drwxr-xr-x 3 root staff 4.0K Mar 6 2012 extensions
-rwxr-xr-x 1 root staff 3.9K Mar 6 2012 firefox
-rwxr-xr-x 1 root staff 44K Mar 6 2012 firefox-bin
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 greprefs
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 icons
-rw-r--r-- 1 root staff 478 Mar 6 2012 libfreebl3.chk
-rwxr-xr-x 1 root staff 326K Mar 6 2012 libfreebl3.so
-rwxr-xr-x 1 root staff 1.1M Mar 6 2012 libmozjs.so
-rwxr-xr-x 1 root staff 201K Mar 6 2012 libnspr4.so
-rwxr-xr-x 1 root staff 853K Mar 6 2012 libnss3.so
-rwxr-xr-x 1 root staff 390K Mar 6 2012 libnssckbi.so
-rw-r--r-- 1 root staff 478 Mar 6 2012 libnssdbm3.chk
-rwxr-xr-x 1 root staff 121K Mar 6 2012 libnssdbm3.so
-rwxr-xr-x 1 root staff 81K Mar 6 2012 libnssutil3.so
-rwxr-xr-x 1 root staff 14K Mar 6 2012 libplc4.so
-rwxr-xr-x 1 root staff 8.8K Mar 6 2012 libplds4.so
-rwxr-xr-x 1 root staff 123K Mar 6 2012 libsmime3.so
-rw-r--r-- 1 root staff 478 Mar 6 2012 libsoftokn3.chk
-rwxr-xr-x 1 root staff 194K Mar 6 2012 libsoftokn3.so
-rwxr-xr-x 1 root staff 501K Mar 6 2012 libsqlite3.so
-rwxr-xr-x 1 root staff 169K Mar 6 2012 libssl3.so
-rwxr-xr-x 1 root staff 12K Mar 6 2012 libxpcom.so
-rwxr-xr-x 1 root staff 16M Mar 6 2012 libxul.so
-rw-r--r-- 1 root staff 31K Mar 6 2012 LICENSE
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 modules
-rwxr-xr-x 1 root staff 11K Mar 6 2012 mozilla-xremote-client
-rw-r--r-- 1 root staff 137 Mar 6 2012 platform.ini
-rwxr-xr-x 1 root staff 3.7K Mar 6 2012 plugin-container
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 plugins
-rw-r--r-- 1 root staff 177 Mar 6 2012 README.txt
-rw-r--r-- 1 root staff 16K Mar 6 2012 removed-files
drwxr-xr-x 6 root staff 4.0K Mar 6 2012 res
-rwxr-xr-x 1 root staff 9.8K Mar 6 2012 run-mozilla.sh
drwxr-xr-x 2 root staff 4.0K Mar 6 2012 searchplugins
-rw-r--r-- 1 root staff 825 Mar 6 2012 Throbber-small.gif
-rw-r--r-- 1 root staff 6 Mar 6 2012 update.locale
-rwxr-xr-x 1 root staff 71K Mar 6 2012 updater
-rw-r--r-- 1 root staff 143 Mar 6 2012 updater.ini"
Broken or ok, there's no link foo > bar.
Reply to: