Filesystems – Make Linux Forbid Colons in File Names on NTFS Partitions

filenamesfilesystemsntfs

Does Linux really allow colons in file names, even on NTFS partitions? Why is that? And is there any option to set it straight, and do not allow colons (and other characters restricted by Windows) in file names when working with a NTFS partition? And do allow it for Ext2, Ext3 and Ext4 partitions?

Linux wrote some files with colons in their names to my main NTFS partition where I have Windows installed. I have since uninstalled Linux, but now I can't open these files in Windows.

Best Answer

In case of NTFS-3G check out the ntfs-3g man page and search for "windows_names".

excerpt

windows_names

This option prevents files, directories and extended attributes to be created with a name not allowed by windows, either because it contains some not allowed character (which are the nine characters ” * / : < > ? \ | and those whose code is less than 0×20) or because the last character is a space or a dot. Existing such files can still be read (and renamed).

Related Question