bug-fileutils
[Top][All Lists]
Advanced

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

Re: ls sorting behavior changed in fileutils-4.1


From: Jim Meyering
Subject: Re: ls sorting behavior changed in fileutils-4.1
Date: 16 Jun 2001 13:05:00 +0200
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/21.0.104

Keith Thompson <address@hidden> wrote:
| This problem was pointed out by Victor Zandy <address@hidden>
| in a recent post to gnu.misc.discuss.
|
| The sorting behavior of the ls command has changed between
| fileutils-4.0 and fileutils-4.1 (and between Redhat 7.0 and 7.1).
| In my opinion, the new behavior is incorrect.  The change is not
| mentioned in the documentation as far as I can tell.
|
| A workaround is to set the environment variable $LC_ALL to "C",
| but a user shouldn't have to do this.

Thanks for the report.

FYI, setting LC_ALL to "C" is overkill.
You can get the desired effect by setting LC_COLLATE instead.

I've made this change to the documentation:

@@ -4540,7 +4540,13 @@
 non-option argument is specified, @code{ls} operates on the current
 directory, acting as if it had been invoked with a single argument of @samp{.}.
 
-By default, the output is sorted alphabetically.  If standard output is
address@hidden LC_COLLATE
+By default, the output is sorted alphabetically, according to the locale
+settings in effect. @footnote{If you have arranged to use a address@hidden
+locale (e.g., by setting @env{LC_ALL} to @samp{en_US}), then @code{ls} may
+produce output that is sorted differently than you're accustomed to.
+In that case, set the @env{LC_COLLATE} environment variable to @samp{C}.}
+If standard output is
 a terminal, the output is in columns (sorted vertically) and control
 characters are output as question marks; otherwise, the output is listed
 one per line and control characters are output as-is.



reply via email to

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