Linux is case-sensitive

Posted onCategoriesLAMP

Linux is case-sensitive. For example: myfile, Myfile, and myFILE are three different files. Your password and login name are also case-sensitive. (This follows tradition since both UNIX and the “c” programming language are case-sensitive.) Naming conventions for files and directories are identical. All the files and directories which you create (for yourself, as a user) are lower-case, unless there Linux is a very special reason to make it different.

Most of Linux commands are also all lower case. Filenames under Apache Linux can be up to 256 characters long and they normally contain letters, numbers, “.” (dots), “_” (underscores) and “-” (dashes). Other characters are possible but not recommended. In particular, it is not recommended to use special metacharacters: “*” (asterisk), “?” (question mark), ” ” (space), “$” (dollar sign), “&” (ampersand), any brackets, etc.

This is because metacharacters have special meaning to the Linux shell (shell is something like COMMAND.COM, the command processor under DOS). It is possible to have a space in the filename, but we don’t recommend it either–we use underscore “_” instead. It is not possible at all to have ‘/’ (slash) as a part of the filename because ‘/’ is used to represent the top of the directory tree, and as PHP a separator in the pathnames (the same as ” is in DOS).