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

cd

cd [dir ]
cd [-LP ] [dir ]
cd [-LP ] [- ]
cd [-LP ] [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, the CDPATH variable is searched. The last three command forms are specific to the Korn shell, where - stands for the previous directory. The fourth syntax modifies the current directory name by replacing string old with new and then switches to the resulting directory.

Options

-L

Use the logical path (what the user typed, including any symbolic links) for cd .. and the value of PWD. This is the default.

-P

Use the actual filesystem physical path for cd .. and the value of PWD.

Example

$ pwd


/var/spool/cron
$ cd cron uucp

	cd prints the new directory

/var/spool/uucp


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

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










??????????????@Mail.ru