Introduction to the Unix Cluster. Node: Directories
When you log in, you are automatically placed in your home
directory (which is referred to as ~ or $HOME). The
following are some of the most useful directory commands and their uses:
pwd - `
Print Working Directory', displays the current
working directory on the screen.
cd - change directories. Typing cd by itself is an easy
way to get back to your home directory.
ls - lists the contents of a directory. Useful options are
l (long listing) and a (lists `
files such as `
mkdir - create a new directory. If the new name doesn't start
with a /, it is taken relative to the current directory.
rmdir - deletes an empty directory. If it isn't empty, you must
either delete everything in it separately or use the command rm -r.
ln - establishes a link between two files (especially between
directories) to allow direct access of one from the other.