> i found a probably bug in ls -L (dereference) today, take a look:

Thanks for the report.  But what you are seeing is not a bug.

> [magma@keymerkur124 /tmp]$ cd /tmp ; touch source ; chmod 000 source ; ln -s source 
>link
> [magma@keymerkur124 /tmp]$ ls -l link ; ls -l source ; ls -Ll link
> lrwxrwxrwx    1 magma    freebits        6 Mai 22 21:11 link -> source
> ----------    1 magma    freebits        0 Mai 22 21:11 source
> ----------    1 magma    freebits        0 Mai 22 21:11 link

> Why doesn't ls -L print the dereferenced name of the file the link is
> pointing? Any reason?

The behavior of -L is to dereference the symlink and report on the 
target of the symlink.  But the name is still the same name as you
referenced it the first time.  In other words it is doing what it is
supposed to be doing.  It is just not doing what you want it to be
doing.

> It would be great if it did it, because you can determine a file a
> link is pointing to without a extravagant...
>      ls -l | sed 's,.* -> \(.*\),\1,'
>                                           ...or something like that.

I think that would confuse a lot of people.  Ask it to list foo but
instead it lists bar?  I will sit back now and see what other people's
comments on this are.

Bob


_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils

Reply via email to