bug-coreutils
[Top][All Lists]
Advanced

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

Re: ls 4.5.7 sort order bug


From: Bob Proulx
Subject: Re: ls 4.5.7 sort order bug
Date: Sat, 10 May 2003 11:52:44 -0600
User-agent: Mutt/1.3.28i

Jim Kunzman wrote:
> There is a bug in the sort routine for Gnu ls version 4.5.7.  I am using
> Mandrake 9.1.  To demonstrate the problem:

Thanks for the report.  You have hit a common ailment.  So often that
a standard reply has been prepared.  Please read this section on sort
in the FAQ.  Look for "not sorting in normal order" This is not a
problem with GNU sort but with your 'locale'.  GNU sort is behaving as
required.

  http://www.gnu.org/software/fileutils/doc/faq/

You can see which locale you are configured to use with the 'locale'
command.

  locale

Typically this is set with the LANG variable.  You can unset lang to
return to the built in standard default and I believe all sorting
operations will return to what you expect.

  unset LANG

If that is not your problem then please send another followup to the
list.  But I am pretty sure this is your problem.

Bob

P.S. The following looks to be using dictionary sort ordering where
case is folded and punctuation is ignored.  A questionable "feature"
of en_US and some other locales.

> >mkdir foo
> >cd foo
> >touch Test.class TestExpression.class TestExpression.java Test.java
> >ls -al
> total 8
> drwxr-xr-x    2 jim      jim          4096 May 10 10:36 ./
> drwxr-xr-x   72 jim      jim          4096 May 10 10:32 ../
> -rw-r--r--    1 jim      jim             0 May 10 10:36 Test.class
> -rw-r--r--    1 jim      jim             0 May 10 10:36 TestExpression.class
> -rw-r--r--    1 jim      jim             0 May 10 10:36 TestExpression.java
> -rw-r--r--    1 jim      jim             0 May 10 10:36 Test.java
> 
> Note that Test.java doesn't follow Test.class in the sort order.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]