| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Linux Path Names and File Names The basic rules for a path name in Linux have a similar form. All files and directories are referenced from the root file system which is designated as a / symbol. Notice, this is the forward slash_ (/) not the backward slash (\) that Windows uses. The initial directory name underneath the root would follow and then sub directory names would be appended, each separated by a / with the file name at the end. File and directory names can be made up of any alphanumeric characters and other characters on the keyboard with the exceptions of / and \. However since the characters (~`?";<>[]|&*^$% and the space can have special connotations to the command interpreter, it is suggested that they not be used. Most typically, Linux users use a _ (underscore) in a file name to replace a space. For example instead of: xyz a folder being used as a file name, xyz_ a folder would be used instead. The concept of file extensions that Windows uses to identify the program to be used to open a file is not used in Linux. Linux has a different technique to identify the contents of file and potentially its creator. The character . (Dot) can be used within a file name whenever and wherever desired. Therefore, the file name program.name.new would be a perfectly acceptable file name. One special use of the . in a file name is to create what is known as hidden files by starting the file name with a period. This will cause files starting with this character (.) do not normally be displayed when list directory commands are used. One additional concept in file names is that of an absolute (complete) name and a relative (partial) name. Absolute path names, which also can be thought of as complete path names, are simply that, the complete path name from the root to the file name including all intermediate directories. Relative paths names, or partial path names, is a listing of sub directories from the current directory to a file. The separator that the shell uses between directory names again is the /. An example, if one is within the directory, example, which is within the home directory, referencing the file today_7_15_03.usefull, which is in the calendar directory using the absolute file name would be: /home/example/calendar/today_7_15_03.useful The relative path name would be if /home/example is the current directory: calendar/today_7_15_03.useful
Linux file and directory names are case sensitive, which is an additional important distinction between Windows and Linux naming conventions. In other words, the name file is a different name than the name File.
Home - Table Of Contents - Contact Us CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com Version 1.0 - Version Date: March 29, 2005 Adapted with permission from a work created by Tcat Houser et al. CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||