Many (most?) programs note file extensions in lower case. ls command in bash even prints foo.jpg highlighted as picture by default but not *.JPG.

Lower case characters are better to distinguish from each other because they make use of descenders.

Is there a standard or convention that suggests to prefer lower case file extensions on Linux systems?

(similar, but different question: https://softwareengineering.stackexchange.com/questions/186313/lowercase-in-linux-file-names)


The following naming conventions should be observed.

  • All file names should be in lower case.
  • EXCEPTION: Plain text files such as README, INSTALL, NEWS, AUTHORS
  • Do not use spaces in file names. Use either a '-' or a '_'.
  • Use only alphanumeric characters, periods, underscores and hyphens. Make file names concise.
  • Avoid overly long and complex file names. Avoid Camel Case. (Capitalizing the first letter in each word. Ex. ThisIsCamelCase.sh)
  • Use the same extension for each file type. (.jpg vs .jpeg)

These rules have become industry convention because you just never know how someone else's code will handle file names. Will file names with spaces break something? Will it recognize .jpg's while ignoring .jpeg files? Remember, filenames are case sensitive. Readme is not the same file as README. The nice thing about conventions, once you know them, is that they save you time as there's no need to ponder how your files will be named. 





  • Isn't camelcasing common for java.classes? – Jarmund May 14 '15 at 19:27
  • 1
    If you're working with Java, you work with Java. The naming conventions are platform agnostic, and they're among the first things you learn that commonly cause problems for new developers. – Alex Atkinson May 14 '15 at 19:35
  • I could not see the link to the oracle website as source. The cyberciti website seems to be just a personal blog... – Jonas Stein May 14 '15 at 21:23
  • I mention that the rules have become industry convention because there was never one written to begin with. You shouldn't discount personal blogs. There's more helpful information on blogs than in all the tech spec's in the world. You don't have to adhere to these widely accepted best practices, but you'll be pissed when you find a reason to a few months into a project that's already behind schedule. :P – Alex Atkinson May 14 '15 at 23:41

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.