Re: ls sorting order change
On Wed, 02 May 2012 15:28:33 -0400, Dan B. wrote:
> Camaleón wrote:
>> On Tue, 01 May 2012 15:10:23 -0400, Dan B. wrote: ...
>>
>>> 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.
>>
>> (...)
>>
>> Can you post a sample of the command you issued and the ouput you got?
>
> It was like (using made-up names):
>
> .aaa
> bbb
> ccc
> DDD
> EEE
> .fff
>
> when I expected:
>
> .aaa
> .fff
> DDD
> EEE
> bbb
> ccc
Let's see:
sm01@stt008:~/Desktop/test$ locale
LANG=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=
So this is the default "ls" sorting:
sm01@stt008:~/Desktop/test$ ls -la
total 1
drwxr-xr-x 2 sm01 sm01 192 may 3 18:33 .
drwxr-xr-x 10 sm01 sm01 816 may 3 18:32 ..
-rw-r--r-- 1 sm01 sm01 0 may 3 18:32 .aaa
-rw-r--r-- 1 sm01 sm01 0 may 3 18:32 bbb
-rw-r--r-- 1 sm01 sm01 0 may 3 18:32 ccc
-rw-r--r-- 1 sm01 sm01 0 may 3 18:33 DDD
-rw-r--r-- 1 sm01 sm01 0 may 3 18:33 EEE
-rw-r--r-- 1 sm01 sm01 0 may 3 18:33 .fff
While changing the locale:
sm01@stt008:~/Desktop/test$ LANG=C ls -la
total 1
drwxr-xr-x 2 sm01 sm01 192 May 3 18:33 .
drwxr-xr-x 10 sm01 sm01 816 May 3 18:43 ..
-rw-r--r-- 1 sm01 sm01 0 May 3 18:32 .aaa
-rw-r--r-- 1 sm01 sm01 0 May 3 18:33 .fff
-rw-r--r-- 1 sm01 sm01 0 May 3 18:33 DDD
-rw-r--r-- 1 sm01 sm01 0 May 3 18:33 EEE
-rw-r--r-- 1 sm01 sm01 0 May 3 18:32 bbb
-rw-r--r-- 1 sm01 sm01 0 May 3 18:32 ccc
> I guess now I need to figure out where I might like to see things in the
> "new" order vs. where I still want to see things in LC_COLLATE=C order.)
Is that "that new"? The above output is from my Lenny system and that was
the default setup two years ago :-?
Greetings,
--
Camaleón
Reply to: