GNU bug report logs - #36666
Minor bug/inconsistency in ls command

Previous Next

Package: coreutils;

Reported by: hoffelmann <at> gmail.com

Date: Mon, 15 Jul 2019 13:53:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: L A Walsh <coreutils <at> tlinx.org>
To: hoffelmann <at> gmail.com
Cc: 36666 <at> debbugs.gnu.org
Subject: bug#36666: Minor bug/inconsistency in ls command
Date: Tue, 16 Jul 2019 01:30:14 -0700
On 2019/07/15 00:01, hoffelmann <at> gmail.com wrote:
> Hi,
>
> I am using ls from the cureutils 8.31 on arch linux (5.2.0 x86_64) and
> think it has a bug/inconsistant in printing an file type indicator (-F) 
> while using the long listing format (-l).
>
>
> If I use `ls -F ~` I get the following output:
> -----------------------------------------------------------------------
> Desktop/    Downloads/	Nextcloud/  Pictures/  Templates/  Workspace/
> Documents/  Music@	OneDrive/   Public/    Videos/
>
>
> As the Music directory in ~ is a symbolic link to another folder an @
> is appended.
>
>
> But when using `ls -Fl ~` the output is
> -----------------------------------------------------------------------
> lrwxrwxrwx  1 rxo users   15  8. Jul 08:07 Music -> OneDrive/Music//
>   
----
In this case, ls -Fl is showing you the result of the link expansion and
the focus is on the 'target', i.e., the OneDrive/Music.  The classifier
character is being shown only for the target -- not the source of the
symlink.

In a different way, in the top listing the '@' in the 1st ls is telling
you that
Music is a symlink, in the 2nd listing, the '->' tells you that the same
thing,
that Music was(is) a symlink, so the '@' would be superfluous.  Instead,
it puts
a classifier on the target so you know what type it is.

One could think of it as inconsistent -- but only if remembering that
inconsistent options (different options) were given as well.


 




This bug report was last modified 5 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.