EECS 1012 Lecture Notes - Lecture 6: Working Directory
EECS 1012 Lecture 6 Notes
Introduction
Initial working directory
• Each user is assigned a tree branch that can be expanded below that subdirectory and a
starting point, known as the initial working directory.
• On a single-user system, the initial working directory is established by the system.
• In Windows, it is C:\Users\yourusername.
• In the Macintosh, it is a subdirectory just below the root called the desktop.
• From the current directory, the user can access files anywhere in the system.
• The file name or new working directory can be specified relative to the current working
directory
• Absolutely, from the root, by using a relative or absolute pathname, respectively
• The difference is easily determined by the system, since absolute pathnames begin with
the oot ae o syol ad elative pathaes do’t.
• Whe a use euests a file fo the syste, the syste looks fo the file i the use’s
current working directory, or in the location specified by the pathname.
• Most systems also provide an environmental variable called path that allows the user to
specify other path locations that are to be searched for the file if a pathname is not
given and if the file is not found in the current working directory.
• There is a specified order to the search so that if there is more than one file that
qualifies, only the first file found is accessed.
• The user can also change his or her current working directory.
• The user moves around the tree using a CHANGE DIRECTORY command.
• An absolute or relative pathname can be used.
• To change the current working directory from directory
• For example, one could issue a CD command or one could use the full path name.
• On systems that do not allow relative pathnames above the current directory, the CD
find more resources at oneclass.com
find more resources at oneclass.com
ammarmarta2020 and 40175 others unlocked
10
EECS 1012 Full Course Notes
Verified Note
10 documents