pwd and cd: the most basic linux/ unix commandsyfeaste/cpsc101...pwd “pwd” stands for print...

6
PWD and CD: The Most Basic Linux/ Unix Commands

Upload: trinhdan

Post on 23-Mar-2018

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: PWD and CD: The Most Basic Linux/ Unix Commandsyfeaste/cpsc101...PWD “pwd” stands for print working directory and its purpose is to print the full path to the current directory

PWD and CD: The Most Basic Linux/

Unix Commands

Page 2: PWD and CD: The Most Basic Linux/ Unix Commandsyfeaste/cpsc101...PWD “pwd” stands for print working directory and its purpose is to print the full path to the current directory

PWD

  “pwd” stands for print working directory and its purpose is to print the full path to the current directory

  The “full path” is just a fancy word for the hierarchies from the root directory to the current directory. These directories are marked by a forward slash followed by the name of the directory.

(i.e. /Users/rossbullock/Documents)

  This command is most commonly used right after the “ls” (which lists the contents of the current directory) and “cd” commands (which changes the directory; you’ll learn about that later), to make sure the user is where they want to be

  The pwd command only has two standard options, ---help and --version. The --help option is used to show information about pwd, but since it’s a simple command, most times it barely prints any. The --version option just shows the version number.

Page 3: PWD and CD: The Most Basic Linux/ Unix Commandsyfeaste/cpsc101...PWD “pwd” stands for print working directory and its purpose is to print the full path to the current directory

For example,

Page 4: PWD and CD: The Most Basic Linux/ Unix Commandsyfeaste/cpsc101...PWD “pwd” stands for print working directory and its purpose is to print the full path to the current directory

Directories

  Directories are where you store folders containing information

  To Change Directories you type in cd and then the name of the Directory you want to change to

  To find a certain directory you can also press the tab button after you type in the first few letters of the directory

Page 5: PWD and CD: The Most Basic Linux/ Unix Commandsyfeaste/cpsc101...PWD “pwd” stands for print working directory and its purpose is to print the full path to the current directory

  Ex.

  You use cd to pick the directory 101 which is why it says 101 username on terminal

  after seeing the folders in 101 you then type cd temp to change the directory to temp

Page 6: PWD and CD: The Most Basic Linux/ Unix Commandsyfeaste/cpsc101...PWD “pwd” stands for print working directory and its purpose is to print the full path to the current directory

Work cited

  http://www.linfo.org/pwd.html

  http://guides.macrumors.com/Terminal