bug-fileutils
[Top][All Lists]
Advanced

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

Re: ls bug?


From: Matt Schalit
Subject: Re: ls bug?
Date: Thu, 28 Jun 2001 10:50:37 -0700

Bob Proulx wrote:
> 
> > I've just installed linux 2.4.4 and, much to my dismay, noticed the
> > behaviour of ls has changed. Indeed, it would seem the leading dot in
> > dotfiles is ignored when ls sorts its output. The result is a mess of
> > regular files interspersed with dotfiles. I hope you realize how much of
> > an impact this can have on scripts which rely on the standard behaviour
> > of ls.
> 
> Thanks for the report.  It matches a common pattern.  This is not due
> to a bug, but to the fact that you have set environment variables that
> direct the program to use locale specific sorting tables.  You or your
> vendor have probably set environment variables like LANG, LC_ALL, or
> LANG to en_US.  There appears to be a problem with that table which is
> not part of the GNU program but part of your vendor's system release.
> 
> Unset them, and then set LC_ALL to POSIX
> 
>   # If you use bash or some other Bourne-based shell,
>   export LC_ALL=POSIX
> 
>   # If you use a C-shell,
>   setenv LC_ALL POSIX
> 
> and it will then work the way you expect.
> 
> See the standards documentation for more information on LC_*
> variables.
> 
>   http://www.unix-systems.org/single_unix_specification_v2/xcu/ls.html
> 
> Bob


A few thoughts for Fady,

Though I'm just a n00b, a lesser fix is to set 
LC_COLLATE=POSIX or LC_COLLATE=C.  It works for me. 

I do that so I don't affect my LANG, which is set to 
facilitate certain international characters.

Regards,
Matthew



reply via email to

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