[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls -L shows wrong filename?
From: |
Jim Meyering |
Subject: |
Re: ls -L shows wrong filename? |
Date: |
Fri, 09 May 2003 00:02:32 +0200 |
Tim Waugh <address@hidden> wrote:
> Is it intentional that 'ls -L' shows the wrong file name in this
> situation?:
loaded question :-)
> rm -rf arena;mkdir arena;cd arena
> touch file
> ln -s file symlink
> ls -Ll symlink
>
> The mode and timestamps for 'file' are shown, as expected, but the
> filename shown is 'symlink'.
>
> This is being tracked at:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90251
Thanks for forwarding that, but it sure looks like
the existing behavior conforms to POSIX. It is also
consistent with what e.g., Solaris' ls does.
However, the coreutils documentation didn't
describe that aspect, so I've just added this to the
description of ls's --dereference (-L) option:
Index: doc/coreutils.texi
===================================================================
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.107
diff -u -p -u -p -r1.107 coreutils.texi
--- doc/coreutils.texi 23 Apr 2003 08:39:00 -0000 1.107
+++ doc/coreutils.texi 8 May 2003 21:58:49 -0000
@@ -4987,6 +4987,8 @@ except @samp{..}, and the third ignores
@cindex symbolic links, dereferencing
When showing file information for a symbolic link, show information
for the file the link references rather than the link itself.
+However, even with this option, @command{ls} still prints the name
+of the link itself, not the name of the file that the link points to.
@item -R
@itemx --recursive
Jim
P.S. Your message didn't make it through to the list for some
odd reason. And even my attempt to forward it failed, because
some intermediary (the list software?) removed your included
message from the body of my message.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: ls -L shows wrong filename?,
Jim Meyering <=