1

I'm trying to change only the case in the filename and getting the error:

ayakovlev@ubuntu:~/host$ mv crc32.hpp CRC32.hpp
mv: ‘crc32.hpp’ and ‘CRC32.hpp’ are the same file

Is it any setting somewhere which controls this mv behavior? I don't have any aliases for the mv. The mv version is below:

ayakovlev@ubuntu:~/host$ mv --version
mv (GNU coreutils) 8.20
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Parker, David MacKenzie, and Jim Meyering.

Ubuntu version is:

ayakovlev@ubuntu:~/host$ uname -a
Linux ubuntu 3.11.10.3 #1 SMP Thu Mar 6 15:31:54 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

IMPORTANT UPDATE:

Note, that the crc32.hpp file resides on the host filesystem. The host is VMWare Fusion on MacPro, and the Ubuntu is a guest VM.

3
  • 1
    Could you add the output of ls -l crc32.hpp CRC32.hpp and stat crc32.hpp CRC32.hpp Mar 24, 2014 at 21:58
  • ...and strace mv crc32.hpp CRC32.hpp and ls ???32.hpp? I remember a rant about case-insensitive case-preserving filesystems on the linux-kernel mailing list, but I can't find it anymore.
    – Rmano
    Mar 24, 2014 at 22:34
  • 1
    You probably need to workaround the thing by mv crc32.hpp tempf; mv tempf CRC32.hpp. Case-insensitive and case preserving filesystems are difficult to interoperate with (sane) case sensitive ones. See also stackoverflow.com/questions/8904327/case-sensitivity-in-git
    – Rmano
    Mar 24, 2014 at 22:44

1 Answer 1

2

This is probably related to the filesystem. I suspect that on a FAT32 FS the mv command will ignore case, as the FS itself ignores case. The same issue can afflict Mac-based filesystems.

12
  • No, it's not the case... I'm running Ubuntu as virtual machine in VMWare Fusion on MacPro, and this file resides on the host filesystem, which is shared with VM.
    – HEKTO
    Mar 24, 2014 at 21:42
  • 1
    @AlekseyYakovlev, then the host filesystem ignores case.
    – psusi
    Mar 24, 2014 at 22:15
  • @psusi - No, I tried to mv directly from the MacPro shell, it changes the case without any problems
    – HEKTO
    Mar 24, 2014 at 22:21
  • @AlekseyYakovlev, then the virtual host filesystem driver in the guest thinks it is case insensitive.
    – psusi
    Mar 24, 2014 at 22:28
  • 1
    @psusi I think that the virtual host filesystem driver has no other option than show the filesystem as case insensitive. Otherwise an open("A", "r") will not find a, wreaking havoc. Case-insensitive but preserving like the Mac one are a very difficult to map to Unix semantics.
    – Rmano
    Mar 24, 2014 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .