cd - Change working directory

Synopsis

cd [ directory ]

Description

You can use cd to change the working directory. qsh sets the PWD variable to the new working directory and the OLDPWD variable to the previous working directory.

Options

None.

Operands

For directory, you can specify:

- (minus)
qsh changes the working directory to the previous directory and displays the new working directory name.
/name or ../name
qsh changes the working directory to the specified name.
name (does not begin with a / or ../)
If the CDPATH variable is set, qsh prepends each directory in CDPATH to name to construct a directory name. qsh changes to the first directory that you have permission to. qsh displays the new working directory name.

If the CDPATH variable is not set, qsh changes the working directory to the specified name.

not specified
qsh changes the working directory to the value of the HOME variable.

You must have permission to the specified directory.

Exit status

  • 0 when successful.
  • >0 when unsuccessful.