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 am unable to rename a file from RELEASE to release which is currently located on my USB flash drive. If I try to rename it through the file manager (Nautilus), it shows the error message as follows:

enter image description here

Also if I try to rename the same file in the terminal, I get this error message:

avinash@avinash-Lenovo-IdeaPad-Z500:/media/avinash/89E8-9E47/DISTS/QUANTAL$ mv RELEASE release
mv: ‘RELEASE’ and ‘release’ are the same file
avinash@avinash-Lenovo-IdeaPad-Z500:/media/avinash/89E8-9E47/DISTS/QUANTAL$

However, I appear to be able to rename the file to any other name like RELEASE to othername.

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Your USB flash drive is probably formatted using a FAT filesystem. This family of filesystems is case insensitive in terms of filename uniqueness.

See also Wikipedia: Case sensitivity on this:

Old Windows filesystems (VFAT, FAT32) are not case-sensitive (there cannot be a readme.txt and a Readme.txt in the same directory) but are case-preserving, i.e. remembering the case of the letters.

This means you'll have to reformat the drive to another filesystem in case you need two files with the same name except for the casing.

However, I think you can change the name of the file in two-steps:

mv RELEASE RELEASE-temp
mv RELEASE-temp release
share|improve this answer
    
There was 6 directories on it.On each directory there was 5 subdirectories.In each subdirectory there was minimum 10 files.In this case what can i do? –  Avinash Raj Dec 15 '13 at 18:27
    
Is this applicable to NTFS too? I am able to rename my file(on an NTFS) to a same-name-different-case file. –  i08in Jan 2 at 8:14
    
Seems like this is only applicable to FAT fs(as you mentioned), not to NTFS(as I presumed it might be). +1 for a hackyway to rename the file. –  i08in Jan 2 at 8:20
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.