Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

User Commands (c) cd(1)
NAME
cd - Changes the current directory
SYNOPSIS
cd argume nt
DESCRIPTION
The cd command changes the current directory to argument, where argument is a pathname.
If argument is a - (dash), the directory is changed to the previous directory.
The HOME shell parameter is the default argument. The PWD parameter is set to the current
directory. The CDPATH shell parameter defines the search path for the directory containing
argument.
Separate alternative directory names with a : (colon). The default path is a null string, specifying
the home directory. Note that the current directory is specified by a full pathname.
If argument begins with a / (slash), the search path is not used. Otherwise, each directory in the
path is searched for argument.
EXAMPLES
1. The following command changes to the directory one level above the current
directory.
cd ..
2. The following command changes to a directory named mywork that is one
level beneath the users home directory.
cd mywork
NOTES
The cd command is a shell built-in command. It differs from the regular commands in that it does
not open a new shell process when it executes.
A general discussion of shell built-in commands and a list of the OSS shell built-in commands
are in the reference page for sh(1).
RELATED INFORMATION
Commands: pwd(1), sh(1).
527188-021 Hewlett-Packard Company 269