[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls sort order
From: |
Matthew Schalit |
Subject: |
Re: ls sort order |
Date: |
Fri, 11 May 2001 02:02:59 -0700 |
Hey now,
"Roy C. Sigsbey" wrote:
>
> Who the FUCK gave you authority to change the sort order for
> the "ls" command. You have now FUCKED OVER 25 years of progamming.
> The version of "ls" as shipped with RedHat Linux 7.1 is SHIT and
> it's YOUR FAULT!!!
Ouch. Sound's like Roy's pissed.
Hmmm. RedHat 7.1? Don't own it. But perhaps
I can post the wrong answer, then we'll get the
right one quick like.
> ALL files should be listed in STRICT ANSI order, not intermixed
> with the goddamn DOT files!!!
Perhaps. I only have a Unix box to test on, but it
has a native ls and gnu ls (ver. 4.1). Both showed the same
search order when I entered
ls -al
on my home directory. Dot files were intermixed with
regular files. I wonder if ls -al is what Roy's referring to.
Well, if it is, then
truss ls -al
shows that the files are lxstat'ed in one order:
lxstat(4, ".", 0x0805D63C) = 0
lxstat(4, "..", 0x0805D6E0) = 0
lxstat(4, ".login", 0x0805D828) = 0
lxstat(4, ".profile", 0x0805D8CC) = 0
lxstat(4, ".vtlrc", 0x0805D970) = 0
lxstat(4, ".UpgradeVer7.1.0", 0x0805DA14) = 0
lxstat(4, "mbox", 0x0805DAB8) = 0
lxstat(4, "Java", 0x0805DB5C) = 0
lxstat(4, "Dload", 0x0805DC00) = 0
lxstat(4, "QuickSco.html", 0x0805DCA4) = 0
lxstat(4, ".sh_history", 0x0805DD48) = 0
lxstat(4, "Mail", 0x0805DDEC) = 0
lxstat(4, "CpuHog.txt", 0x0805DE90) = 0
lxstat(4, "Bin", 0x0805DF34) = 0
lxstat(4, "Images", 0x0805DFD8) = 0
lxstat(4, "mail", 0x0805E07C) = 0
lxstat(4, ".dt", 0x0805E120) = 0
lxstat(4, ".dtprofile", 0x0805E1C4) = 0
lxstat(4, ".netscape", 0x0805E268) = 0
lxstat(4, "nsmail", 0x0805E30C) = 0
lxstat(4, ".Xauthority", 0x0805E3B0) = 0
lxstat(4, "nsnews", 0x0805E454) = 0
lxstat(4, "dognome", 0x08060648) = 0
lxstat(4, ".mime.types", 0x080606EC) = 0
lxstat(4, ".mailcap", 0x08060790) = 0
lxstat(4, "upc.bmp", 0x08060834) = 0
lxstat(4, ".gv", 0x080608D8) = 0
getdents(3, 0x0805B240, 2048) = 0
close(3) = 0
open("/usr/lib/locale/en_US/LC_COLLATE", O_RDONLY, 01001075150) = 3
But then the files are sorted by the locale defs
in LC_COLLATE, above, and then displayed in
semi-alphabetical order:
-rw------- 1 matthew other 0 Oct 21 1999 .addressbook
-rw------- 1 matthew other 2285 Oct 21 1999 .addressbook.lu
-rw------- 1 matthew family 100 Mar 11 12:46 barf
-rw------- 1 matthew family 170 Feb 6 11:13 .bash_history
drwx------ 2 matthew family 1024 Apr 26 21:41 Bin
-rw------- 1 matthew family 16777216 May 6 21:36 core.26846
...
So isn't the issue really Roy's default locale?
Then again, there was this:
2001-01-02 Paul Eggert <address@hidden>
Make ls -l compatible with POSIX, which requires that the
behavior of time formats must depend only on LC_TIME, not on
LC_MESSAGES.
But, that's LC_TIME.
There was this, which could be it:
2000-11-11 Paul Eggert <address@hidden>
* src/ls.c (<langinfo.h>): Include if HAVE_LANGINFO_H.
(DATE_FMT_LANGINFO): New macro, taken from sh-utils/src/date.c.
(print_long_format): Use it to determine "date" format.
Do not wrap "%b %e %Y" and "%b %e %H:%M" in _(), as it results in
incorrect behavior when LC_ALL is unset, LC_TIME is "C", and
LC_MESSAGES or LANG is set to something disagreeing with the POSIX
locale.
> GO DIRECTLY TO HELL!
There already.
> --
> Roy C. Sigsbey <address@hidden>
> http://www.yourwish.com/
My wish is for binutils ld to be able to find /usr/lib/libc.so.1
and for gcc 3.1 to stop shoving -Qy down gnu-as's ass so
../gcc/configure
won't error out on the first damn test.
Regards,
Matthew
- ls sort order, Roy C. Sigsbey, 2001/05/10
- Re: ls sort order,
Matthew Schalit <=