University of Southern California

ITS Information Technology Services

A division of the Office of the Chief Information Officer

UNIX File Structure

Logically, UNIX is structured like a tree. The top level directory is called root and is represented by /. Under the root are several directories. Some of the more important ones are:

home usr var tmp

Everyone's home directory is located under home. Most UNIX applications are located under usr. Everyone's mail spool is located under var. You can temporarily store files under tmp.

Moving Around

You can change to a directory by specifying the full path starting at root. Some examples:

You can change to a user's home directory by using the ~ symbol followed by a username. Some examples:

You can change to a subdirectory of the current directory by typing the subdirectory name. Some examples assuming you are in a directory called fruits which contains subdirectories named apple, banana and orange:

You can move up one directory from the current directory by typing .. which stands for the parent directory. For example:

    cd ..

At any point in time, you can return to your home directory by simply typing cd with no arguments. For example:

    cd

For more info on using cp and other directory commands, see the ITS documentation at Directory Commands.

Last updated:
February 03, 2011