EECS 1012 Lecture Notes - Lecture 6: Working Directory

39 views2 pages
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 ae o syol ad elative pathaes do’t.
Whe a use euests a file fo 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
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in
ammarmarta2020 and 40175 others unlocked
EECS 1012 Full Course Notes
10
EECS 1012 Full Course Notes
Verified Note
10 documents

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents