4

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.

  • The why part: because Linux allows any character other than nul and / in file names. : is used in the name of the X socket and little else. I don't know about the NTFS part. – Gilles Feb 10 '14 at 0:00
  • A colon in NT denotes a stream (i.e. "sub-file") -- much like the old MAC HFS forks. (it's a damn good way of hiding things in windows.) – Ricky Beam Feb 10 '14 at 3:17
  • the colon is used by wine in the symlinks under ~/.wine/dosdevices, which is ironic don't you think? since these names would not be allowed on an NTFS partition. You have to disable the streams if you want to use it like on ext4. AFAIK, you can do this in your fstab. Or with your question, (which is the opposite), make sure you DONT disable it. You probably dont want that though if you are using the partition for user or temp directories, since many tools out there use colons like spam assassin(off the top of my head) you can delete those files i think using sysinternals suite – osirisgothra Jul 1 '14 at 15:31
3

In case of NTFS-3G check out http://www.tuxera.com/community/ntfs-3g-manual/ 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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.