To navigate your Linux file system, there are several terms you should understand.
Current directory The directory you are in at a given time, sometimes called the current working directory. The pwd
(print working directory) command will tell you the name of the current directory.
Parent directory The directory above the current one. Every directory except the top level has a parent. If you are in the /usr/spool directory, then /usr is the parent.
Home directory A user's personal directory. For example, if your user name is hermie, your home directory is /home/hermie. The user normally has complete control over all files stored in directories beneath the home directory. Exception: If the root user copies a file to your home directory, root still owns and controls that file.
Root directory The top of the file system, denoted by a slash. Only subdirectories appear below this directory. Don't confuse this with /root, the home directory for the root user. When speaking, always refer to / as "the root directory" and to /root as "slash root."
Absolute file name A file name that is valid no matter where you are in the file hierarchy. In practice, this means it must start with a slash and specify the full path to the file. For example, /home/hermie/recipes/sludge_fudge is an absolute file name, but sludge_fudge is not.
Relative file name A file name that specifies a file relative to the current directory. For example, if you were in hermie's home directory, /home/hermie/, you would reference that healthy fudge recipe as recipes/sludge_fudge.
Previous Lesson: Linux Directories
Next Lesson: Navigating the File System
Comments (most recent first)
Bob Rankin (21 Aug 2010, 17:38)
@ganesh - No difference.
ganesh (19 Aug 2010, 07:19)
What is the difference between /home and /home/
hpal (20 May 2010, 22:15)
Guys you don't have to be confused on the destination of your directory you
will be, when using (.) or (..)
(.) Simply denotes the current folder/directory (..) Simply denotes the parent directory / When use without . or .. as prefix. It means root directory or folder As explained on other section on this site, each folder represents a branch of a tree, and the root itself is the tree. Files are treated as leaves. That is why using multiple combination of ../ will move back to the each parent, depending on the number of times being called. And if using cd ../ with no parent will always go to the root.
Kurt (22 Mar 2010, 21:23)
cd../.. gives an error message
cd ../.. moves back two places to home cd ../../.. moves back three places cd ../../../.. still only moves back three places because we can't go back any further
J (09 Mar 2010, 12:45)
No.....I think that now the directory should be home/jvale04922.
Bob Rankin (02 Mar 2010, 05:19)
A trick question! You're still in the same directory. Do you know why?
joey (01 Mar 2010, 09:22)
if my current directory is: $ pwd home/jvale04922/irm230 and i excecute the
command $ cd../.. What directory am i in now?
|
|
|
![]() |
|
| <Send This Link to a Friend> <Bookmark This Page> | ||