Public bug reported:

Binary package hint: coreutils

The ls option -F (and the equivalent  --classify) incorrectly inhibits
de-referencing symbolic links as if -d were also specified.

I think this behavior is incorrect because it prevents looking into
symlinked-to directories using the -F option.  Put another way, the user
could specify -Fd if they do not want to de-reference symlinks, and so
-F alone should not imply or force -d for symlinks.

Also, the current behavior does not follow the documentation.   man
ls(1) pretty clearly documents -F and -d as being independent options,
and does not mention -F having any side-effects:

-d, --directory
              list directory entries instead of contents, and do not  derefer‐
              ence symbolic links

-F, --classify
              append indicator (one of */=>@|) to entries

EXAMPLE: On my system:
$ cd /
$ ls -ld lib*
drwxr-xr-x 14 root root 12288 2009-10-21 18:22 lib/
drwxr-xr-x  7 root root 12288 2009-10-13 14:48 lib32/
lrwxrwxrwx  1 root root     4 2009-10-07 22:31 lib64 -> /lib/

$ ls -Fd lib64
lib64@
$ ls -F lib64
lib64@               ### EXPECTED TO SEE CONTENTS OF /lib HERE ###

ProblemType: Bug
Architecture: amd64
Date: Thu Oct 22 11:41:39 2009
DistroRelease: Ubuntu 9.10
Package: coreutils 7.4-2ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.41-generic
SourcePackage: coreutils
Uname: Linux 2.6.31-12-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:1835): GLib-CRITICAL **: g_propagate_error: assertion 
`src != NULL' failed
 (gnome-settings-daemon:1835): GLib-CRITICAL **: g_propagate_error: assertion 
`src != NULL' failed
 (polkit-gnome-authentication-agent-1:1899): GLib-CRITICAL **: 
g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:1870): Eel-CRITICAL **: eel_preferences_get_boolean: assertion 
`preferences_is_initialized ()' failed

** Affects: coreutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug

-- 
ls option -F prevents dereferencing symlinks
https://bugs.launchpad.net/bugs/458455
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to