Help - Search - Members - Calendar
Full Version: Strange console behaviour [solved]
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
rohitsz
Hi,
I am experiencing a strange behaviour.
I am unable to rename a directory to its all caps equivalent.
Here's the output:

CODE
[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:

CODE
[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.gif

Please suggest how to achieve what i want to do!

Thanks,
rohit.
scarecrow
Do it without the slash
CODE
mv  foo FOO
rohitsz
Hi,

QUOTE (scarecrow @ Jan 5 2008, 10:53 PM) *
Do it without the slash
CODE
mv  foo FOO


Here's the output:

CODE
[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.
scarecrow
Strange... it works fine here.
Any chance that dir being on FAT or NTFS filesystem?
And- what's the output of
CODE
locale -a

in a console?
rohitsz
Hi,

QUOTE (scarecrow @ Jan 6 2008, 02:20 AM) *
Strange... it works fine here.
Any chance that dir being on FAT or NTFS filesystem?
And- what's the output of
CODE
locale -a

in a console?


yes the dir is a FAT32 filesystem.
here's the output:

CODE
[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.
neddie
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.
scarecrow
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.
rohitsz
Hi,

Thanks to needie and scarecrow 2thumbsup.gif
It was the fat32 partition that caused all this trouble.
I shifted my codebase to an ext3 partition and it worked great! tongue.gif

Thanks a ton to both of you for pointing this out! biggrin.gif

rohit.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.