I would like to name my files and folders according to a specific date, e.g. 03.04.2016
.
I see I can use them but are there any disadvantages to using periods in files or folder names?
I would like to name my files and folders according to a specific date, e.g. 03.04.2016
.
I see I can use them but are there any disadvantages to using periods in files or folder names?
They are valid and you can use them but yes, there are disadvantages.
A period is often used in regular expressions to represent a single character.
A period in filenames is often used as the standard separator between filename and extensions.
A period at the start of a filename is used to indicate configuration and/or hidden files.
For these reasons using periods in filenames for other purposes often leads to issues down the road with other command line functions and other tools and frameworks not expecting them and not working correctly.
Periods by themselves have no meaning, but what follows the period may have meaning to programs that look at the file suffix. For that, look at /etc/mailcap
and /etc/mime.types
Some implementations of ls
can sort by suffix as well, e.g.
ls -lX
for GNU coreutils.
touch
), or making the names begin with a yyyymmdd pattern (no punctuation at all). But OP gave no hints for usage.
– Thomas Dickey
Apr 03 '16 at 15:24
2015-12-31
), which would make it easier to sort your directories chronologically using only their name. – n.st Apr 03 '16 at 14:44.
s are valid characters in file names (it's quite obvious they're valid chars). – don_crissti Apr 04 '16 at 19:46