OK, this should be an easy fix but I can't find it, and it's strictly a cosmetic's issue. on our older Gentoo systems if you do an ls -a it orders the results with all the . files ordered alphabetically then all the non-hidden files alphabetically. it also sorts with capitals first. on the new Centos 5.3 systems ls -a returns all the files sorted alphabetically with capital's and smalls being equal and the . at the start of a hidden file appears to be ignored. There are no alias's in place on either system. eg.) Gentoo: ------------ $ ls -a . .. .Xauthority .bashrc .omega Documents alpha scripts Centos: ------------ $ ls -a . .. alpha .bashrc Documents .omega scripts .Xauthority I'd prefer to see things the Gentoo way. Any idea's?
Hi, On Thu, Sep 3, 2009 at 18:01, Jacob Bresciani <Jacob at aers.ca> wrote:> on the new Centos 5.3 systems ls -a returns all the files sorted > alphabetically with capital's and smalls being equal and the . at the > start of a hidden file appears to be ignored.To fix the sorting order for all users in the system, add the following line to the end of the /etc/sysconfig/i18n file: LC_COLLATE="C" To fix it for a specific user only, add it to the ~/.i18n file instead. HTH, Filipe
Jacob Bresciani wrote:> OK, this should be an easy fix but I can't find it, and it's strictly > a cosmetic's issue. > > on our older Gentoo systems if you do an ls -a it orders the results > with all the . files ordered alphabetically then all the non-hidden > files alphabetically. it also sorts with capitals first. > > on the new Centos 5.3 systems ls -a returns all the files sorted > alphabetically with capital's and smalls being equal and the . at the > start of a hidden file appears to be ignored.In your shell (assuming bash, not csh): export LC_COLLATE=C To set that automatically when you log in, add that line to your ~/.bash_profile . -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.