Jump to content
Sign in to follow this  
rohitsz

Strange console behaviour [solved]

Recommended Posts

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 by rohitsz

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks to needie and scarecrow :thumbs:

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...