Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to have the files on my hard drives always be displayed case insensitive; i.e., from start-up every time. What is the easiest to do this? I am new to Linux and Ubuntu but am learning quickly, using 12.10.

I want to have my mp3 files in the GUI be listed purely alphabetically: AaBbCc, not ABCabc as they appear now. If there's a way to make file names all one case, I'd do that. I have files for bands beginning in both upper and lower case for the same bands; thousands of them. I want the band names to appear in one group.

share|improve this question
    
I want to have my mp3 files in the GUI be listed purely alphabetically: AaBbCc, not ABCabc as they appear now. If there's a way to make file names all one case, I'll do that. I have files for bands beginning in both upper and lower case for the same bands, thousands of them. I want the band names to appear in one group. –  user139553 Mar 12 '13 at 8:39
add comment

3 Answers

The LC_COLLATE environment variable determines sorting. If it is set to POSIX then files sort in a case-sensitive manner. Setting it to something human (like en_GB.UTF-8) will sort alphabetically without respect for case.

Execute locale in a command shell to see your current settings. Set your locale by picking it when logging in to your Unity session. Set the system locale in /etc/default/locale.

Note that if LC_COLLATE is not set, then LANG is the fallback default. You may want to set that instead. Note also that if LC_ALL is set to some value, then it will override LC_COLLATE.

share|improve this answer
add comment

From the Debian introductory tutorials:

UNIX filenames are case-sensitive.

Sorry, you're stuck with it.

There are some extreme hacks you could pull with ciopfs (originally meant for Wine), but they'll affect your whole system (read: break everything). At such a point it's more productive to complain to your music app's developers.

share|improve this answer
    
There's no environment variable I can set in a script somewhere? LC_COLLATE? ciopfs command? I'm not exactly sure how these things work, have just been poking around on Google. –  user139553 Mar 12 '13 at 4:44
    
I should add that I just want to display the files in this manner; i.e., AaBbCc, etc. –  user139553 Mar 12 '13 at 6:57
    
Do not put this information in the comments to an answer. Add them to the question, so the question is clarified. –  zwets Mar 12 '13 at 7:04
    
@user Locale and filesystem hacks will likely break everything else. I've edited the answer to explain them. –  Anko Mar 12 '13 at 11:04
add comment

As you stated in your comment, you'd be content with making file names of mp3s all lower case. You can do this from command line with:

rename 'y/A-Z/a-z/' *.mp3

Rename is based on the Perl scripting language and should be installed by default on your Ubuntu.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.