mv 默认忽略字母大小写吗?

mv 默认忽略字母大小写吗?

我试图仅更改文件名的大小写并收到错误:

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

是否有任何设置可以控制此mv行为?我没有 的任何别名mvmv版本如下:

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 版本是:

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

重要更新

请注意,该crc32.hpp文件位于主持人文件系统。主机是 MacPro 上的 VMWare Fusion,Ubuntu 是客户虚拟机。

答案1

这可能与文件系统有关。我怀疑在FAT32文件系统上mv,命令会忽略大小写,因为文件系统本身会忽略大小写。同样的问题也影响基于 Mac 的文件系统。

相关内容