bug-coreutils
[Top][All Lists]
Advanced

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

problem with 'ls'


From: Jos van Geffen
Subject: problem with 'ls'
Date: Tue, 13 Jul 2004 11:46:32 +0200 (CEST)

Dear address@hidden,

Recently I have installed Linux from SuSE 9.0 (kernel 2.4.21),
which has "ls (coreutils) 5.0".

I have a problem with the 'ls' command, that is: with the way
it sorts the files. Accoring to 'info ls':

    By default, sorting is done by character code (e.g., ASCII
    order).

Now, the '.' has ASCII code 046, capitals A-Z are 065-090,
lower case a-z is 097-122.

So I would expect that files starting with a '.' are listed
before files starting with a capital, which in turn are listed
before files starting with lower case characters.

However, if I do 'ls -a' on e.g. my home directory I get this all
mixed up: the sorting is case INsensitve and leading '.'s are
ignored -- see the example below.

Previousely, 'ls' did not have this problem. Also, it does not
occur on RedHat Linux system I have access to, which has 
"ls (fileutils) 4.1").

How can I tell the current 'ls' (version 5.0) to do a proper
alphabetical (ASCII-based) sort-ing???

For your further information: I am running the /bin/tcsh shell.
The 'root' account runs '/bin/bash' and there 'ls' sorts normally.
But the way 'ls' sorts should NOT depend on the shell in use, right?


Best wishes,

Jos van Geffen

  Belgian Institute for Space Aeronomy
  Ringlaan 3   |   B-1180  Brussels   |   Belgium 
  tel.: +32 (0)2 3730 369 (direct) / 404 (switchboard)
  http://www.aeronomie.be/



=================================

./
../
.addressbook
.addressbook.lu
.alias
.asn/
.bash_history
.bashrc
.bashrc.orig
bin/
.cshrc
.DCOPserver_josvpc2__0
.DCOPserver_josvpc2_:0@
Desktop/
.dir_colors
div/
Documents/
.dvipsrc
.emacs
.esd_auth
.exrc
.fonts/
.fonts.cache-1
.history
.Kbiff/
.kde/
.kderc
.kermrc
.login
Mail/
.mcop/
.mcoprc
.mozilla/
.muttrc
.pinerc
.profile
public_html/
.qt/
.rhosts
.rsync.exclude
.sign/
.skel/
.ssh/
tex/
tmp/
.urlview
.wmrc
.Xauthority
.Xdefaults
.xemacs/
.xinitrc.template*
.xscreensaver
.xsession-errors
.xtalkrc
xxx

=================================





reply via email to

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