GNU bug report logs - #70418
ls bug

Previous Next

Package: coreutils;

Reported by: Toby Kelsey <toby.kelsey <at> gmail.com>

Date: Tue, 16 Apr 2024 15:09:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Toby Kelsey <toby.kelsey <at> gmail.com>
Subject: bug#70418: closed (Re: bug#70418: ls bug)
Date: Wed, 17 Apr 2024 21:45:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#70418: ls bug

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 70418 <at> debbugs.gnu.org.

-- 
70418: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70418
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>,
 Toby Kelsey <toby.kelsey <at> gmail.com>
Cc: Chris Elvidge <celvidge001 <at> gmail.com>, 70418-done <at> debbugs.gnu.org
Subject: Re: bug#70418: ls bug
Date: Wed, 17 Apr 2024 14:43:51 -0700
On 4/17/24 03:19, Pádraig Brady wrote:

> Patch looks good, and conforms to POSIX.

Thanks for the review. I installed the patch and am closing this bug report.


[Message part 3 (message/rfc822, inline)]
From: Toby Kelsey <toby.kelsey <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: ls bug
Date: Tue, 16 Apr 2024 16:07:59 +0100
There appears to be a bug with 'ls' when using the '-f' and '-l' options, or at least an inconsistency with the man 
page. The man page says '-f' list entries in directory order and does not mention any incompatibilities with other 
options, however I find using it with the '-l' option gives different ouputs depending on the order of options. See the 
following script log for an example:


toby <at> toby-pc:/tmp$ mkdir test
toby <at> toby-pc:/tmp$ cd test
toby <at> toby-pc:/tmp/test$ touch c b a foo bar
toby <at> toby-pc:/tmp/test$ ls -lf
.  ..  c  b  a  foo  bar
toby <at> toby-pc:/tmp/test$ ls -fl
total 0
drwxr-xr-x  2 toby toby 140 Apr 16 15:50 .
drwxrwxrwt 18 root root 560 Apr 16 15:50 ..
-rw-r--r--  1 toby toby   0 Apr 16 15:50 c
-rw-r--r--  1 toby toby   0 Apr 16 15:50 b
-rw-r--r--  1 toby toby   0 Apr 16 15:50 a
-rw-r--r--  1 toby toby   0 Apr 16 15:50 foo
-rw-r--r--  1 toby toby   0 Apr 16 15:50 bar
toby <at> toby-pc:/tmp/test$ ls -l -f
.  ..  c  b  a  foo  bar
toby <at> toby-pc:/tmp/test$ ls -f -l
total 0
drwxr-xr-x  2 toby toby 140 Apr 16 15:50 .
drwxrwxrwt 18 root root 600 Apr 16 15:57 ..
-rw-r--r--  1 toby toby   0 Apr 16 15:50 c
-rw-r--r--  1 toby toby   0 Apr 16 15:50 b
-rw-r--r--  1 toby toby   0 Apr 16 15:50 a
-rw-r--r--  1 toby toby   0 Apr 16 15:50 foo
-rw-r--r--  1 toby toby   0 Apr 16 15:50 bar
toby <at> toby-pc:/tmp/test$ type ls
ls is /usr/bin/ls

toby <at> toby-pc:/tmp/test$ ls --version
ls (GNU coreutils) 9.4

Copyright (C) 2023 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.



Written by Richard M. Stallman and David MacKenzie.


Regards,

Toby




This bug report was last modified 1 year and 75 days ago.

Previous Next


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