Pathnames

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: Navigating the tree Up: The File System Previous: How are files

Pathnames

      Files are uniquely named in the file system by specifying the path of directories to look in before finding the file. For example, the file with the asterisk in the picture is named

/u/b/o/bob/private/cs367/a.out. This is its absolute path name. Notice that we use the forward slash character, /, to separate directories in the pathname.

To save you the bother of having to type the whole path every time you want to access a file, UNIX has the concept of a current directory. When you log in, your current directory is your home volume. Files in your current directory may be specified without any pathname attached to the filename. Files in directories below the current directory can be specified with that part of the pathname that begins at the current directory (e.g. if Bob were in his private directory, he could access a.out with cs367/a.out ). This is known as using a relative path name.



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