[SLUG] Broken symlinks
aardvark llama
anisotropy9 at hotmail.com
Tue Sep 17 22:01:01 BST 2002
>I have many files which are shown with white lettering on a red background,
>when usin 'ls -al' at the command line . Sometimes the lettering is also
>flashing. It has been suggested that a red background is displayed because
>of a broken symlink. I'm not sure what this is or how I can fix it.
The colouring is an artifact of using gnu fileutils. If you type:
bogon:~$ alias ls
you should get something like:
alias ls='ls --colour=tty -F -b -T 0'
This is a nice feature but not always helpful because it *is* configurable
and I could have configured ls to display broken links as mauve with a hint
of aqua.
The important stuff to look at is not the colour but stuff like:
bongo:~$ ls -l munch-flak/
total 4
-rw-r--r-- 1 boco users 0 Sep 17 20:16 1
-rw-r--r-- 1 boco users 20 Sep 17 20:16 2
lrwxrwxrwx 1 boco users 1 Sep 17 20:17 4 -> 6/
lrwxrwxrwx 1 boco users 1 Sep 17 20:16 5 -> 5
drwxr-xr-x 2 boco users 4096 Sep 17 20:17 6/
lrwxrwxrwx 1 boco users 1 Sep 17 20:17 7 -> 2
lrwxrwxrwx 1 boco users 1 Sep 17 20:18 8 -> 3
Without enhanced gnu-o-vision, what does this all mean?
Simply this:
1 and 2 are files. 1 is zero length and 2 is 20 bytes long;
4 is a symbolic link to the directory 6;
5 is a -- useless -- symbolic link to itself;
6 is a directory;
7 is a symbolic link to the file 2;
8 is a symbolic link to a non-existant file 3.
To check whether a link exist -- for example in the case of file 8 -- take
the path to the file pointed to, say 3, and ls *that*. In the case of file 8
running ls 3 gives "No such file or directory" and so 8 is a dead link.
>
>Anyone know?
>
>'.DCOPserver_localhost.localdomain -> /home/al/
>.DCOPsever_localhost.localdomain_:0'
This (I think) looks like a self referential symbolic link -- like for
example 5 above.
Hope this doesn't muddy the waters too much.
:)w
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
More information about the Scarborough
mailing list