Re: case sensitivity

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

 



Hi,


If you want to change the filenames to lowercase in the current directory use for example a oneliner (bash) such as:

for i in *; do mv $i `echo $i | tr [A-Z] [a-z]`; done

If you want to spesify a filelisting change the * to `cat filelist.txt`, or use find, ls or any other tool to search for the files (with full path!) you want to change.

To change your #include statements create a script (or a one-liner with at sweet regex) that goes through all the files and changes the filenames to lowercase.

I understand your problem, and if the directories are used by normal users that want simlicity in their world you may want to use samba shares. This way you can force case-insensitivity (in fact to be compatible with MS Windows). In systems that require high performance you would however probably not want this.

To all those people who enjoy critisizing such a request... MS thought about users, not superusers, when they created their systems. There a plenty of computer aliterates out there that even use the resycle bin in MS Windows to store their files since it is always on the desktop... sweet world, ey :-) (move the file to resycle bin and (hopefully) restore it later - wonderful :-) - now the same users are faced with the complexity of case-sensitivty.

Another thing before you start - be very very sure not to have two files with the same "symbolic meaning" but with different case.
That is, do not run the one-liner if you have 2 or more files such as (file.txt and File.txt) because one of them will (depends on the mv command or alias (mv -i ???)) be destroyed in the process.




mVh,
Christian Vik
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux