NAME
cd —
change working directory
SYNOPSIS
cd |
directory |
DESCRIPTION
Directory is an absolute or relative pathname which becomes the new working directory. The interpretation of a relative pathname by cd depends on the CDPATH environment variable (see below).ENVIRONMENT
The following environment variables affect the execution of cd:
CDPATH- If the directory operand does not begin with a slash
(/) character, and the first component is not dot (.) or dot-dot (..),
cdsearches for the directory relative to each directory named in theCDPATHvariable, in the order listed. The new working directory is set to the first matching directory found. An empty string in place of a directory pathname represents the current directory. If the new working directory was derived fromCDPATH, it will be printed to the standard output. HOME- If
cdis invoked without arguments and theHOMEenvironment variable exists and contains a directory name, that directory becomes the new working directory.
See csh(1) for more information on environment variables.
The cd utility exits 0 on success, and
>0 if an error occurs.
SEE ALSO
STANDARDS
The cd command is expected to be
IEEE Std 1003.2 (“POSIX.2”)
compatible.