Supported by: ACS
Files are organized into directories. Which files go into which directories can be arbitrary - for example, you can make your own directories, such as one for homework and one for letters, although no one except you keeps track of what actually goes into these directories. Other times, it can be important that files are placed in specific directories.
When you log in to UNIX, you begin your session in your home directory. You may find that you need to view a file in another directory, for a class assignment for example. You can only view files that are in your current directory, unless you specify a directory path in a command (more on that later).
To change to another directory, enter the following command at a UNIX prompt:
cd directory
replacing directory with the directory name.
For example, if you were in your home directory and wanted to use files in a directory called /class/physics, you'd enter
cd /class/physics
To get back to your home directory, you'd enter
There is an on line manual page. To read it, enter the command man cd at a UNIX prompt.
For general information about working with files, refer to Memo RPI.113, Using UNIX: The Rensselaer Computing System (RCS).
Enter the command pwd at a UNIX prompt at any time to see the full path name of the directory you are in. pwd stands for path name of working directory, or you can think of it as " print working directory. "
To change to another person's home directory, use the tilde ~ as a shortcut:
cd ~millex/public
instead of typing or trying to find out the full path name. (/afs/rpi.edu/home/99/millex, for example.)
To go up one directory level, enter
cd ..
Return to ACS Consulting home page.
Return to the General System page.
Return to ACS home page.
Please send comments and suggestions to
consult@rpi.edu