1) ln -s /tmp foo 2) ls -l foo 3) ls -l foo/ RedHat 5.2 (fileutils 3.16) will list the directory while RedHat 6.0 (fileutils 4.0) will list the symlink twice. I submit that the behavior is annoying, tedious, and a fix for a non-existant problem. The relevant ChangeLog entry reads: Wed Feb 19 22:06:32 1997 Jim Meyering <meyering.gov> * src/ls.c (main): Remove trailing slashes from command line arguments. Otherwise, running `mkdir x; chmod 644 x; ls -d x/' (note the trailing slash) makes ls fail with permission denied on at least Linux 1.2.13 and 2.0.14 systems. A 2.0.36 kernel does indeed say permission denied but RedHat 6.0 does not use a 2.0.x kernel and it works just fine with the 2.2.x kernels. Having the symbolic link listed when an explicit slash is written makes no sense. A trivial fix would be this: --- ./ls.c Tue Aug 17 02:06:11 1999 +++ ./ls.c~ Tue Aug 17 02:07:02 1999 @@ -733,6 +733,7 @@ dir_defaulted = 0; for (; i < argc; i++) { - strip_trailing_slashes (argv[i]); gobble_file (argv[i], 1, ""); } -George Greer
fixed in fileutils-4.0-3, available in the next release.