ls sorting order change
On 2012-05-01 21:10 +0200, Dan B. wrote:
> What controls the order that the ls command uses for sorting names?
The locale or more specifically, the LC_COLLATE setting. See locale(7).
> On a fresh Squeeze installation, ls seems to ignore leading "."
> characters (it no longer lists all "hidden" files adjacent to each
> other) and to ignore capitalization differences.
> It used to sort in standard/traditional Unix order (not ignoring any
> characters, and ordering by order of characters in ASCII/etc. (as
> opposed to by case-insensitive alphabetical order)).
This behavior is not new, but your locale settings may be.
> What controls ls's sorting order?
> I haven't set any locale environment variable specifically for the
> collation order, but I don't know what base LANG=en_US.UTF-8 setting
> does. Does "en_US" imply that new sorting order?
Yes. Unless you override it with a different LC_COLLATE setting, that
> How do I tell ls to work the way I've seen it work for decades?
I've been using LC_COLLATE=C for many years.
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org