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

Re: ls sort order: new, bad, behaviour



On 9/23/07, Ron Johnson <ron.l.johnson@cox.net> wrote:

> > namely, an 'ls' that sorts directories first, and
> > ordinary files afterwards? Do others actually see that behaviour in
> > terminals?

> Sure.  That's how it works for me.

> $ locale
> LANG=
> LANGUAGE=en_US:en_GB:en
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL=

I have those values in place, partly as a result of doing 'export
LANGUAGE=en_US:en_GB:en', and I now have 'locale' output identical to
yours, but not the wanted 'dirs-first' behaviouir:

zoidberg@alison:~$ locale
LANG=
LANGUAGE=en_US:en_GB:en
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

$ ~$ ls -l |more
total 255108
-rw-r--r--  1 zoidberg zoidberg      1702 Oct 17  2005 BobZoidmanBernstein.asc
-rw-r--r--  1 zoidberg zoidberg      1053 Mar 14  2006 DisDetFunc.aux
-rw-r--r--  1 zoidberg zoidberg      8456 Mar 14  2006 DisDetFunc.log
-rw-r--r--  1 zoidberg zoidberg       258 Mar 14  2006 DisDetFunc.out
-rw-r--r--  1 zoidberg zoidberg     70809 Mar 14  2006 DisDetFunc.pdf
-rw-r--r--  1 zoidberg zoidberg     17626 Mar 14  2006 DisDetFunc.sgml
-rw-r--r--  1 zoidberg zoidberg     17609 Mar 14  2006 DisDetFunc.sgml~
-rw-r--r--  1 zoidberg zoidberg     16340 Mar 14  2006 DisDetFunc.tex
-rw-r--r--  1 zoidberg zoidberg    204241 May  3  2006 HeideggerSpiegel.pdf
-rw-------  1 zoidberg zoidberg       157 Jun 12 23:48 KathyAmex.txt.nc
-rw-------  1 zoidberg zoidberg      1258 Nov  5  2006 Mailbox
drwx------ 12 zoidberg zoidberg      1024 Jul 19 16:20 Maildir
-rw-r--r--  1 root     root           645 Nov  9  2006 Muttrc
-rw-r--r--  1 zoidberg zoidberg    744180 Feb 10  2006 Silva-1.4-extra-2.tgz
-rw-r--r--  1 zoidberg zoidberg   5416881 Feb 10  2006 Silva-1.4.1-all.tgz
.gz
-rw-------  1 root     root           157 Sep 16  2006 alison.txt.nc

Do you have LS_OPTIONS set, or 'ls' aliased?

If I may make so bold as to speak for others too, I hate this locale
stuff that has descended on us since etch came into the world. Is
there a nice dummy-friendly Debian Locale How-To? How, for instance,
did you *set* those locale values shown in your post?

Go Sox.

Best regards,

-- 
No no no, my fish's name is Eric, Eric the fish. He's an halibut. I am
not a looney! Why should I be tarred with the epithet looney merely
because I have a pet halibut?



Reply to: