rohitsz Posted January 5, 2008 Share Posted January 5, 2008 (edited) Hi, I am experiencing a strange behaviour. I am unable to rename a directory to its all caps equivalent. Here's the output: [rkumar@localhost oawclassic.generatorwc.project]$ ls build.properties* meta-inf/ model/ oaw/ pom.xml* src/ target/ todo.txt* [rkumar@localhost oawclassic.generatorwc.project]$ mv meta-inf/ META-INF mv: cannot move `meta-inf/' to `META-INF': File exists [rkumar@localhost oawclassic.generatorwc.project]$ ls META-INF ls: cannot access META-INF: No such file or directory [rkumar@localhost oawclassic.generatorwc.project]$ Ok if this was not strange, see this: [rkumar@localhost oawclassic.generatorwc.project]$ rename meta-inf/ META-INF [rkumar@localhost oawclassic.generatorwc.project]$ ls build.properties* meta-inf/ model/ oaw/ pom.xml* src/ target/ todo.txt* [rkumar@localhost oawclassic.generatorwc.project]$ The rename seems to be successful, but still i am not able to see the all caps renamed file! :unsure: Please suggest how to achieve what i want to do! Thanks, rohit. Edited January 8, 2008 by rohitsz Link to comment Share on other sites More sharing options...
scarecrow Posted January 5, 2008 Share Posted January 5, 2008 Do it without the slash mv foo FOO Link to comment Share on other sites More sharing options...
rohitsz Posted January 5, 2008 Author Share Posted January 5, 2008 Hi, Do it without the slash mv foo FOO Here's the output: [rkumar@localhost oawclassic.generatorwc.project]$ mv meta-inf META-INF mv: cannot move `meta-inf' to `META-INF': File exists [rkumar@localhost oawclassic.generatorwc.project]$ No success still ! thanks, rohit. Link to comment Share on other sites More sharing options...
scarecrow Posted January 5, 2008 Share Posted January 5, 2008 Strange... it works fine here. Any chance that dir being on FAT or NTFS filesystem? And- what's the output of locale -a in a console? Link to comment Share on other sites More sharing options...
rohitsz Posted January 7, 2008 Author Share Posted January 7, 2008 Hi, Strange... it works fine here.Any chance that dir being on FAT or NTFS filesystem? And- what's the output of locale -a in a console? yes the dir is a FAT32 filesystem. here's the output: [rkumar@localhost oawclassic.generatorwc.project]$ locale -a C CP1251 en en_AU en_AU.ISO-8859-1 en_AU.UTF-8 en_BE en_BE.ISO-8859-1 en_BE.ISO-8859-15 en_BE.UTF-8 en_BW en_BW.ISO-8859-1 en_BW.UTF-8 en_CA en_CA.ISO-8859-1 en_CA.UTF-8 en_DK en_DK.ISO-8859-1 en_DK.UTF-8 en_GB en_GB.ISO-8859-1 en_GB.UTF-8 en_HK en_HK.ISO-8859-1 en_HK.UTF-8 en_IE en_IE.ISO-8859-1 en_IE.ISO-8859-15 en_IE.UTF-8 en_IN en_IN.UTF-8 en_NG en_NG.UTF-8 en_NZ en_NZ.ISO-8859-1 en_NZ.UTF-8 en_PH en_PH.ISO-8859-1 en_PH.UTF-8 en_SG en_SG.ISO-8859-1 en_SG.UTF-8 en_US en_US.ISO-8859-1 en_US.UTF-8 en_ZA en_ZA.ISO-8859-1 en_ZA.UTF-8 en_ZW en_ZW.ISO-8859-1 en_ZW.UTF-8 hi hi_IN hi_IN.UTF-8 ISO-8859-1 ISO-8859-13 ISO-8859-14 ISO-8859-15 ISO-8859-2 ISO-8859-3 ISO-8859-4 ISO-8859-5 ISO-8859-7 ISO-8859-9 KOI8-R KOI8-U POSIX UTF-8 [rkumar@localhost oawclassic.generatorwc.project]$ Could it be that some linux process is watching over this directory? Thus not allowing the rename to happen. thanks, rohit. Link to comment Share on other sites More sharing options...
neddie Posted January 7, 2008 Share Posted January 7, 2008 If it's FAT32, it won't work because FAT32 is case-insensitive. It can't distinguish between meta-inf and META-INF. If you're using the rename command, it doesn't work with just two parameters as you've called it - you really need three parameters to get it to work. See man rename for more info - or better still just stick with the "mv" command which is simpler. Link to comment Share on other sites More sharing options...
scarecrow Posted January 7, 2008 Share Posted January 7, 2008 Both FAT32 and NTFS do not distinguish upper- and lowercase (and windows in general). Only things like passwords and files within a cifs filesystem are case sensitive. Link to comment Share on other sites More sharing options...
rohitsz Posted January 8, 2008 Author Share Posted January 8, 2008 Hi, Thanks to needie and scarecrow It was the fat32 partition that caused all this trouble. I shifted my codebase to an ext3 partition and it worked great! :P Thanks a ton to both of you for pointing this out! :D rohit. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now