What are reserved filenames for various platforms?
From: http://www.grouplogic.com/knowledge/index.cfm/fuseaction/view_Info/docID/111.
The following characters are invalid as file or folder names on Windows using NTFS:
/
?
<
>
\
:
*
|
"
and any character you can type with the Ctrl key.In addition to the above illegal characters the caret
^
is also not permitted under Windows Operating Systems using the FAT file system.Under Windows using the FAT file system file and folder names may be up to 255 characters long.
Under Windows using the NTFS file system file and folder names may be up to 256 characters long.
Under Window the length of a full path under both systems is 260 characters.
In addition to these characters, the following conventions are also illegal:
- Placing a space at the end of the name
- Placing a period at the end of the name
The following file names are also reserved under Windows:
aux
,com1
,com2
,- ...
com9
,lpt1
,lpt2
,- ...
lpt9
,con
,nul
,prn
Full description of legal and illegal filenames on Windows: http://msdn.microsoft.com/en-us/library/aa365247.aspx
A tricky Unix gotcha when you don't know:
Files which start with - or -- are legal but a pain in the butt to work with, as many command line tools think you are providing options to them.
Many of those tools have a special marker "--" to signal the end of the options:
gzip -9vf -- -mydashedfilename