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
tag 15828 notabug
close 15828
stop
On 11/07/2013 06:54 PM, Aharon Robbins wrote:
> 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.
>
The newest POSIX says "may turn off" -l:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html
> 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?
FreeBSD and GNU ls are in sync and don't turn off -l with -f
solaris is compliant but divergent here.
I don't see a need for -f to ignore any -l,
hence I'm closing this issue for now.
thanks,
Pádraig.
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.