FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-01-2012, 07:10 PM
"Dan B."
 
Default ls sorting order change

What controls the order that the ls command uses for sorting names?


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)).


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?


How do I tell ls to work the way I've seen it work for decades?


Thanks,
Daniel







--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4FA0351F.8010100@kempt.net">http://lists.debian.org/4FA0351F.8010100@kempt.net
 
Old 05-01-2012, 07:31 PM
Sven Joachim
 
Default 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
is.

> 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.

Cheers,
Sven


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 874nrzy9y1.fsf@turtle.gmx.de">http://lists.debian.org/874nrzy9y1.fsf@turtle.gmx.de
 

Thread Tools




All times are GMT. The time now is 10:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org