ls files/dirs ordering

Under XFCE the order is case-sensitive: first capital letters, then small ones. E.g. 'Z6' comes before 'art'
Under Gnome case does not matter, 'Z6' comes after 'art'

What setting(s) can I change in XFCE to have ordering like in Gnome?
 
Interesting. I think in ASCII, 'A' is before 'a', so "Z*" should come before "a*". Are there environment variables relating to the sorting order? LOCALE, LC, LANG? Maybe the default in XFCE is different from GNOME? UTF vs ASCII?
 
Code:
dice@fbsd-test:~/temp % env LANG=C.UTF-8 ls -l
total 3
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 A
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 B
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 C
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 a
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 b
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 c
dice@fbsd-test:~/temp % env LANG=en_US.UTF-8 ls -l
total 3
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 a
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 A
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 b
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 B
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 c
-rw-r--r--  1 dice  dice  0 Apr 26 21:30 C

 
You can likely change behavior by setting the LC_COLLATE environment variable (or even LANG or LC_ALL). A value of "C" results in "A B a b" sort order, a value of "en_US.UTF-8" in "a A b B".
 
Back
Top