Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using multiple dots (.) in file names

Tags:

php

web

Are there reasons not to use multiple . in website file names (images, css files, js files...) like in logo.french.png?

like image 233
Emanuil Rusev Avatar asked Jan 09 '11 21:01

Emanuil Rusev


People also ask

Can filename have multiple dots?

This is very easy to answer: Yes, dots are allowed everywhere in Linux filenames.

Is it OK to use periods in file names?

Don't start or end your filename with a space, period, hyphen, or underline. Keep your filenames to a reasonable length and be sure they are under 31 characters. Most operating systems are case sensitive; always use lowercase. Avoid using spaces and underscores; use a hyphen instead.

Can you put dot in file name?

A dot is used as the separator between base-filename and extension. "." & ".." are reserved to represent the current & parent directory. On *nix systems a dot at the start of a filename makes it a hidden file. what works on one system may not on the other.


2 Answers

Too bad that answers cannot be so short: No.

Update:

Mmh ok let me think (you wanted that!):

  • URLs don't restrict the uses of periods in the path.
  • The normal file naming restrictions of the OS your server is running on apply.
    If you run Linux or UNIX then you should be pretty free in naming your files (regarding periods). Windows, not so sure ;)

Update 2:

There might be some special configurations of your web server (like Apache's content negotiation) that also uses several periods in the filename to distinguish content. But that should not interfere with naming your files this way.

like image 107
Felix Kling Avatar answered Sep 30 '22 16:09

Felix Kling


No.

The only reason I can think of to not use multiple .'s in a filename is that a very poorly written file-extension checker might get confused.

like image 22
mpen Avatar answered Sep 30 '22 18:09

mpen