<tt>cd</tt>: Change Directory



next up previous contents
Next: mkdir: Make Directory Up: File system Commands: Previous: File system Commands:

cd: Change Directory

To move from one directory to another the cd command is used. Use as:

cd [directory]

directory may be an absolute, or a relative pathname. Or it may be nothing at all: if cd is used by itself, the user returns to his/her home directory.

An absolute-or full-pathname starts with /. In other words, the path taken to get to the directory is given beginning at the top of the tree, through all the nodes, to the destination directory.

The relative pathname of the directory gives the route taken from the current directory, to the destination directory. Note that . (dot) means this current directory, .. (dot dot) means the previous directory, and that ~ (tilde) means the user's home directory. For example

cd ../testdir
means go up one directory, then down into the testdir directory at that node.

cd (by itself) is equivalent to cd ~.



Super-User
Fri Feb 17 15:55:40 EST 1995