Home

Best practices for Linux file naming

Linux servers are case sensitive. Windows servers are not case sensitive, so if you are moving your files from a Windows development platform to a Linux web platform you may need to watch out for the following common mistakes.

Mixing Upper case and lower case A common mistake is naming files a mixture of upper case and lower case. Like the following:

MyFileName.html

Linux reads the file name exactly the way its typed. So,

MyFileName.html

Is NOT the same as:

myfilename.html

Incorrect types file extension File extensions are case sensitive as well. Some file types have 4 letters and others 3. See the following example:

Likewise, file extensions need to be exact as well:

MyFileName.HTML

Is NOT the same as:

myfilename.html

To prevent running into problems with your file paths on your site, we recommend following the best practices for file naming. See the below:

Name all your files lower case. Instead of using a space, use an ( _ ) or a ( – )

In Linux, the convention is to use lowercase for directory and file names. Here are some key points regarding this convention:

Case Sensitivity: Linux is case-sensitive, meaning File.txt and file.txt are considered two different files. Using lowercase helps avoid confusion. Readability: Lowercase names are generally easier to read and type, especially in commands. Standard Practices: Many software projects and open-source communities adopt lowercase naming conventions for consistency. Underscores and Dashes: It's common to use underscores (_) or dashes (-) to separate words in file names, e.g., my_script.sh or my-script.sh.

Date:

Screen Dimensions