home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: case Chapter 4
The Bourne Shell and Korn Shell
Next: Reference: continue
 

cd



cd

 [

dir

]


cd

 [ 

-

 ]


cd

 [ 

old new

 ]

With no arguments, change to home directory of user. Otherwise, change working directory to dir . If dir is a relative pathname but is not in the current directory, then the CDPATH variable is searched. The last two command forms are specific to the Korn shell, where - stands for the previous directory. The third syntax modifies the current directory name by replacing string old with new , then switches to the resulting directory.

Example


$ 

pwd


/usr/spool/cron
$ 

cd cron uucp

	# cd prints the new directory
/usr/spool/uucp


Previous: Reference: case UNIX in a Nutshell: System V Edition Next: Reference: continue
Reference: case Book Index Reference: continue

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System