![]() |
Computer Systems Lab CS1000 |
![]() Wiscinfo |
![]() CS Home |
![]() CSL |
![]() CS1000 |
![]() Feedback |
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.