bug-fileutils
[Top][All Lists]
Advanced

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

Re: ls


From: Bob Proulx
Subject: Re: ls
Date: Sun, 19 May 2002 12:13:20 -0600

> Recent versions of ls seem to have changed the way files are listed so
> that files beginning with a dot are now scattered amongst the other files
> in the listing so that if I type ls -la I get:

Thank you for your report.  But you have hit a common problem with a
commercial distribution and not an ls problem.  File a bug report with
your vendor.  Here is a standard reply.

Bob

Please check out the FAQ section on sort.

  
http://www.gnu.org/software/fileutils/doc/faq/#Sort%20does%20not%20sorting%20in%20normal%20order!

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

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

  http://www.unix-systems.org/single_unix_specification_v2/xcu/sort.html

> Hi,
> 
> Recent versions of ls seem to have changed the way files are listed so
> that files beginning with a dot are now scattered amongst the other files
> in the listing so that if I type ls -la I get:
> 
> drwxr-sr-x    9 root    root        1024 May 16 15:05 ./
> drwxrwsr-x    3 root    root        1024 Oct 16  2001 ../
> -rw-------    1 root    root       16527 May 18 13:04 .bash_history
> -rw-r--r--    1 root    root         367 Jul 20  2001 .bash_profile
> -rw-r--r--    1 root    root         358 May 16 15:05 .bashrc
> -rwxr--r--    1 root    root         240 Jul 22  2001 .bell*
> -rw-r--r--    1 root    root         349 Jul 20  2001 .gvimrc
> drwx--S---    2 root    root        1024 Nov  1  2001 Mail/
> -rw-------    1 root    root       13343 Mar 18 10:24 mbox
> drwxr-sr-x    2 root    root        1024 Apr  1 16:24 .ncftp/
> drwxr-sr-x    2 root    root        1024 Mar 20 14:16 PERL/
> -rw-r--r--    1 root    root          16 Jul 20  2001 .profile
> -rw-r--r--    1 root    root        3416 Oct  1  2001 .screenrc
> drwxr-sr-x    2 root    root        1024 Mar 18 15:02 share/
> 
> whereas before all the . files were listed at the top. As this is
> unwanted/unexpected behaviour I consider it a bug. Are there any plans to
> allow ls to list in its previous manner or are there any commandline
> switches I can use to stop the current behaviour from occuring? I don't
> want to stop viewing files beginning with a dot, I like to see all files
> when I list the directory.
> 
> Thanks,
> 
> --
> 
> Lee



reply via email to

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