Kaixo!

> From: Xavier Bertou <[EMAIL PROTECTED]>
> To: Cooker ML <[EMAIL PROTECTED]>
 
> Hi,
> with the new ls from fileutils-4.1-1mdk, ls sorts by the first
> alphanumerical character, *but ignoring* a leading '.'. ls -a is now a
> mix of .something files and normal files. Is this the expected behaviour
> of ls ?
> lpnp69 ~  ls -A
> a
> aa
> .AbiSuite
> a.c
> accept.ps
> .acrorc
> a.fig.bak
> a.gif
> aires
> [...]
> It also ignores lower/upper case...

Yes, that is normal in fact.
Now the sorting is done according to the locale. That is, a human-logic
sorting, as defined by the sorting rules that exist for the language/country
combinaison you are using (eg, with LC_COLLATE=fr_BE thoser are the
rules used in Belgium to sort French language).

The uppercase and lowercase are threated the same; and non alphanumerics
have no weight in sorting (so .zz is sorted after aaa).

You can use the special locale 'C' to avoid using any human sorting rule.
The C locale doesn't sort letters, it only sort numeric byte values.
For that you can do:

LC_COLLATE=C ls -A

or, if you want that sorting behaviour for everything, you can set that
value in your $HOME/.i18n or /etc/sysconfig/i18n


PS: note that, contrary to Windows, directories have always been displayed
intermixed with regular files, and nobody ever complained; that is, it is
a matter of habitude.


> -- 
> Xavier
> 


-- 
Ki �a vos v�ye b�n,
Pablo Saratxaga

http://www.srtxg.easynet.be/            PGP Key available, key ID: 0x8F0E4975

Reply via email to