[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls behaves stragely with "-L -l -d" options
From: |
Paul Eggert |
Subject: |
Re: ls behaves stragely with "-L -l -d" options |
Date: |
Mon, 07 Aug 2006 20:42:50 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> If I create a directory witha file in it, and a link to the directory:
>
> kamandi:/tmp/ls_test$ mkdir dir
> kamandi:/tmp/ls_test$ touch dir/file
> kamandi:/tmp/ls_test$ ln -s ./dir link
>
> ls -L -l -d on the link gives me the file information for the directory,
> but the name of the link. This seems like a bug to me.
It's the historical behavior, and it's required by POSIX.
<http://www.opengroup.org/susv3/utilities/ls.html> says that in this
situation "ls shall write the name of the link itself and not the file
referenced by the link."
Perhaps the coreutils documentation could be clarified? Is it not
clear in this area?