[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ls sorting order change



On 05/01/2012 03:10 PM, Dan B. wrote:
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?


Well man ls says

" List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified."

Guess you could start there.
Hope this helps

Wayne


Reply to: