[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71171: ls -U, -f: document the other half of the story too
From: |
Dan Jacobson |
Subject: |
bug#71171: ls -U, -f: document the other half of the story too |
Date: |
Fri, 24 May 2024 10:32:04 +0800 |
Man ls says:
-U do not sort; list entries in directory order
Please make it say:
-U do not sort; list entries in the order they were given on
the command line, and files within directories using their
directories' order
And on (info "(coreutils) Sorting the output") please change:
‘-U’
‘--sort=none’
Do not sort; list the files in whatever order they are stored in
the directory. (Do not do any of the other unrelated things that
‘-f’ does.) This can be useful when listing large directories,
where sorting can take some time.
to instead say:
‘-U’
‘--sort=none’
Do not sort; list the files in the order they were given on the
command line, and files within directories in whatever order they
are stored in the directory. (Do not do any of the other unrelated
things that ‘-f’, above, does.) This can be useful when listing
large directories, where sorting can take some time.
Proof:
$ echo $PATH | tr -s : \\n
/home/jidanni/bin
/usr/local/sbin
/usr/local/bin
/usr/local/games
/usr/sbin
/usr/bin
/usr/games
/sbin
/bin
$ echo $PATH | tr -s : \\n | xargs ls -Uogd
drwxr-xr-x 1 632 05-24 05:47 /home/jidanni/bin
drwxr-xr-x 1 0 04-17 12:34 /usr/local/sbin
drwxr-xr-x 1 0 04-17 12:34 /usr/local/bin
drwxr-xr-x 1 0 04-17 12:34 /usr/local/games
drwxr-xr-x 1 6028 05-23 07:42 /usr/sbin
drwxr-xr-x 1 19542 05-23 20:01 /usr/bin
drwxr-xr-x 1 0 01-29 05:20 /usr/games
lrwxrwxrwx 1 8 04-17 12:34 /sbin -> usr/sbin
lrwxrwxrwx 1 7 04-17 12:34 /bin -> usr/bin
Above, -U thankfully allows me to keep the output in the order I gave it!
Wait,
man ls:
-f list all entries in directory order
Same problems all over again with -f documentation.
So please also update the man ls and Info ls "-f" discussions to include
the command line order, as I did above for -U. Thanks.
ls (GNU coreutils) 9.4
- bug#71171: ls -U, -f: document the other half of the story too,
Dan Jacobson <=