[Next] [Previous] [Up] [Top] [Contents]

CHAPTER 3 Getting Started

3.6 Directory Navigation and Control


The Unix file system is set up like a tree branching out from the root. The the root directory of the system is symbolized by the forward slash (/). System and user directories are organized under the root. The user does not have a root directory in Unix; users generally log into their own home directory. Users can then create other directories under their home. The following table summarizes some directory navigation commands.

Navigation and Directory Control Commands
Command/SyntaxWhat it will do
cd [directory]change directory
ls [options] [directory or file]list directory contents or file permissions
mkdir [options] directorymake a directory
pwdprint working (current) directory
rmdir [options] directoryremove a directory

If you're familiar with DOS the following table comparing similar commands might help to provide the proper reference frame.

Unix vs DOS Navigation and Directory Control Commands
CommandUnixDOS
list directory contentslsdir
make directorymkdirmd & mkdir
change directorycdcd & chdir
delete (remove) directoryrmdirrd & rmdir
return to user's home directorycdcd\
location in path
(present working directory)
pwdcd

3.6.1 - pwd - print working directory
3.6.2 - cd - change directory
3.6.3 - mkdir - make a directory
3.6.4 - rmdir - remove directory
3.6.5 - ls - list directory contents

Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]