2005年7月23日

解決mount vfat filename大寫問題

這問題困擾我好一陣子,在Linux下mount windows的partition,會遇到一個問題,如果你建一個檔名是ABC,會被自動改成小寫的abc,好不容易讓我找到解決方法。

參考man mount:

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".

所以下次我要mount PSP時只要加上-o shortname=winnt就可以了。