GNU bug report logs -
#15828
behavior of ls -f
Previous Next
Reported by: Aharon Robbins <arnold <at> skeeve.com>
Date: Thu, 7 Nov 2013 18:56:01 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello.
There is a difference between the Solaris ls and ls on GNU/Linux
and many other systems. In particular, ls -f turns off -l (and other
options, see below).
This breaks a test I have in the gawk test suite.
The citation from POSIX:
> > The readdir test fails because the -f option to ls turns off -l. I think
> > the Solaris ls is broken.
>
> This is perfectly POSIX-compliant behavior. See
> http://pubs.opengroup.org/onlinepubs/000095399/utilities/ls.html
>
> -f [XSI] Force each argument to be interpreted as a directory and list the
> name found in each slot. This option shall turn off -l, -t, -s, and -r, and
> shall turn on -a; the order is the order in which entries appear in the directory.
And even if I set POSIXLY_CORRECT GNU/Linux ls doesn't turn off -l.
$ ls --version
ls (GNU coreutils) 8.13
I will probably rewrite my test (sigh).
In the meantime, comments?
Thanks,
Arnold
This bug report was last modified 11 years and 281 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.