Navigating the tree

University of Wisconsin Madison

Computer Systems Lab CS1000

Wiscinfo
Wiscinfo
CS Home
CS Home
CSL
CSL
Feedback
CS1000
Feedback
Feedback

next up previous contents index
Next: Looking at your Up: The File System Previous: Pathnames

Navigating the tree

      Two commands are useful to navigate the file system tree. They are pwd (print working directory) and cd (change directory). While reading the example below, refer to the previous picture.

vega1%pwd
/u/b/o/bob/private
vega1%cd change directory to your home directory (default of cd)
vega1%pwd
/u/b/o/bob
print the name of the current working directory
vega1%cd cs367
cs367: no such file or directory
trying to make the current directory cs367; fails because cs367 is not a subdirectory of /u/b/o/bob
vega1%cd private/cs367 this is what we want
vega1%pwd
/u/b/o/bob/private/cs367
vega1%ls
prog1.c   a.out
print a list of the files and directories in the current directory
vega1%cd .. .. is a special directory meaning "the directory above the current one" (parent directory)



Caitlin Howell
Thu Jan 16 20:24:40 CST 1997