[Top][All Lists]

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

Re: ls -la behavior change. Feature or Bug?

From: Bob Proulx
Subject: Re: ls -la behavior change. Feature or Bug?
Date: Sat, 2 Mar 2002 22:06:24 -0700

> I realized a change of the behavior of "ls -la" in the latest
> version.

The latest version of fileutils is 4.1.5 available here.


> It does no more list dotfiles at the beginning of
> the listing, instead it ignores the dots and sorts the files
> based on the 2nd character.

The -a option causes ls to list 'a'll entries.  Usually files that
start with a '.' are hidden.  Using the -a does not hide them.  Being
included in the listing those files are sorted normally as any other
file would be sorted.  Nothing special is done with the '.' itself.

> While this "feature" might be funny for some people, I find
> it annoying. ls is a standard unix utility and as such it
> should not change it's well known behavior. Especially not
> in such a way. Beside I didn't find this change mentioned in
> the changelog.

Be careful where you throw stones.  The mostly likely candidate for a
problem is your own system.  If you are using a commercial
distribution you might consider filing a defect report with them.

Here is the standard mailing list reply on this topic. 

This is due to the fact that you or your vendor have set environment
variables that direct the program to use locale specific sorting
tables which do not sort as you expect. 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 on some systems
which is not part of the GNU program but part of your vendor's system

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 because it will use a
different set of tables.

See the standards documentation for more information on the locale
variables with regards to ls.

> So, what I am asking for is: As a user of ls I don't want this.
> Is it possible to turn it off and if yes - how? Will this feature
> stay forever in ls? What ls should I use if this bug (what it
> IMHO is) will be there forever? Would you agree to provide a
> second version of ls to the source tree, say "good-old-ls",
> which people can use if they don't like that the behavior of
> ls changes, like me?


reply via email to

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