[SOLVED]upper case file names in Windows FS mounted in Linux

General support questions
Post Reply
terence
Posts: 19
Joined: 2009/11/11 19:47:39

[SOLVED]upper case file names in Windows FS mounted in Linux

Post by terence » 2014/04/15 16:18:25

Hello,

This is more of a minor annoyance than an actual problem: I have the following line in /etc/fstab to mount things like USB memory
sticks:

/dev/usbstick /mnt/usbstick auto noauto,user 0 0

(I have a udev rule to create /dev/usbstick when the memory stick is inserted.) According to 'df -T ' the file system of this particular usb stick is showing as vfat. Under CentOS 5.8, all file names appear in lower case (assuming they were given names in lower case when they were first created). However, since upgrading to CentOS 6.5, file names now appear in upper case, so I have to convert them to lower case once copied to my linux hard drive. Does anybody know of an easy way to configure my CentOS 6.5 set-up so that file names naturally appear in lower case?

Thanks in advance for any help or suggestions.
Terence
UPDATE: If I do 'mount -t msdos /dev/usbstick /mnt/usbstick', the file names are in lower case, but I'd rather not change the
specification in /etc/fstab from 'auto' to 'msdos', as this would mean I need a different line in /etc/fstab for every other file
system I might encounter in USB storage devices.
Last edited by terence on 2014/04/16 18:58:39, edited 1 time in total.

terence
Posts: 19
Joined: 2009/11/11 19:47:39

Re: upper case file names in Windows FS mounted in Linux

Post by terence » 2014/04/16 18:58:11

Actually, I've been a bit stupid. I should have noticed that the line in /etc/fstab for my DVD drive says:

/dev/dvd /mnt/dvd udf,iso9660 noauto,user,ro 0 0

So this means you can specify multiple file systems in the 'type' field, and presumably mount will try each file system in the order they're listed. So since type msdos results in lower case file names for vfat file systems, and if I want to mount memory sticks formatted in other file systems as well, I can have

/dev/usbstick /mnt/usbstick msdos,auto noauto,user 0 0

Post Reply