linux mount windows文件大写变小写的解决

在Linux OS下mount Windows的文件系统后,进入/mnt目录查看,发现windows的文件夹和文件名都由大写字母变成了小写字母,而在Linux下是严格区分大小写的。 查阅资料后发现在Linux OS下mount Windows disk时需要加一选项。如下
[cc lang=”bash”]mount -t vfat -o shortname=winnt /dev/sda7 /mnt/winF/[/cc]
这样windows的文件会被原原本本的mount到Linux下面。
关于 -o shortname的更多可以参考下面的
[cc lang=”bash”]shortname=[lower|win95|winnt|mixed]

Defines the behaviour for creation and display of filenames which fit into
8.3 characters. If a long name for a file exists, it will always be pre-
ferred display. There are four modes:

lower Force the short name to lower case upon display; store a long name
when the short name is not all upper case.

win95 Force the short name to upper case upon display; store a long name
when the short name is not all upper case.

winnt Display the shortname as is; store a long name when the short name is
not all lower case or all upper case.

mixed Display the short name as is; store a long name when the short name
is not all upper case.

The default is “lower”.[/cc]

除非注明,否则均为芯片版图原创文章,转载必须以链接形式标明本文链接

本文链接:https://www.chiplayout.net/linux-mount-windows-file-upper-becomes-lower.html

发表评论

您的电子邮箱地址不会被公开。

One reply on “linux mount windows文件大写变小写的解决”


七小罗汉 says:

我一看代码就头疼,不适合高技术啊,呵呵

8-8-20118-8-20118-8-20118-8-20118-8-2011