Case Sensitive Sorting in Ubuntu

Magnus Therning magnus at therning.org
Fri Sep 23 12:49:33 UTC 2005


On Fri, Sep 23, 2005 at 03:55:13AM -0700, Adam Done wrote:
>Magnus Therning wrote:
>
>>On Fri, Sep 23, 2005 at 02:43:27AM -0700, Adam Done wrote:
>>  
>>
>>>Ever since I have switched to Ubuntu and have been enjoying the
>>>experience but the one thing that has been troubling me is the lack of
>>>case sensitivity which I really love and use a lot on the systems.
>>>
>>>I know it is not just ls.. for I had looked into that and notice it is
>>>    
>>>
>>>from everything in the terminal to all GUI.   Is there a setting I am
>>  
>>
>>>missing since I am so perplexed?
>>>    
>>>
>>
>>For the command line it's your LC_COLLATE setting. Changing it to "C"
>>puts back case-sensitive sorting (at least in the CLI):
>>
>> $ locale | grep COLLATE
>> LC_COLLATE="en_GB.UTF-8"
>> $ ls coll
>> a A b B c C
>> $ LC_COLLATE="C" ls coll
>> A B C a b c
>>
>>/M
>>
>>  
>>
>
>
>Do I put this in my .bash_profile?

Good question! It depends on what level you want it set.

AFAIK there are three levels that environment variables could be set:

 1. System (i.e. for every login)
 2. Login
 3. Application

Modifying the first is possible through /etc/environment and
/etc/security/pam_env.conf. (There might be more options around though.)

I don't know how to set an environment variable only for my login
session (using GDM). A quick look at /proc/$(pgrep gnome-session)/environ
reveals that nothing relating to my shell is loaded. (Anyone who knows
better?)

The third is application specific. If you only want the setting in your
shell then putting it in .bash_profile will do it.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Computers are incredibly fast, accurate and stupid.
Humans beings are incredibly slow, inaccurate and brilliant.
Together they are powerful beyond imagination.
     -- Albert Einstein 1879 - 1955
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050923/3ca3ca6c/attachment.sig>


More information about the ubuntu-users mailing list