![]() |
Netmar.com |
| Contact Netmar | |
| Order Webhosting | |
| The UNIX file system is best represented as a heirarchical tree structure, with parent directories at the top, and their sub-directories below them. The following is an example of how the UNIX file system is laid out for the user account johndoe: |
|
This long name is called the absolute pathname. The absolute pathname is the full filename from the root directory. Any filename that begins with a '/' is an absolute filename. UNIX eliminates the abuse of the absolute pathname by providing keyboard shortcuts that allow for the use of relative pathnames. Relative pathnames are those pathnames referenced from the current directory. These relative pathnames can best be explained through examples of use of the shortcuts.
This would take the user to johndoe's home directory. NOTE: ~ by itself can be used to reference your own home directory.
If the user is in the directory:
Then, after the user types in: cd .. , they should be here:
If the user wanted to copy the file docs from the directory immediately above it into the current directory, they would simply type:
The command ln -s is used to create a symbolic link to an existing file. A symbolic link is an indirect pointer to a file. A symbolic link can link to any file, regardless of its location in the file structure. For, example, take a look at the file system below, in which there are two accounts, johndoe and janedoe.
Suppose they are working together on a project, so janedoe creates the file 'project' in her www directory. She wants johndoe to help her on it, so he creates a link in his www directory to her project file in her www directory, like so:
| Previous Chapter | Table ofContents | Next Chapter |
|---|