Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


cd command (changes the current directory)

Organization of this page

Format 1

cd [directory-path]

Format 2

cd old new

Description

This command changes the current directory. The destination can be specified in either of two formats.

The first format specifies the destination in directory-path. If the variable CDPATH is defined, this format specifies a directory relative to the location defined in CDPATH. If the variable CDPATH is not defined, this format specifies a directory relative to the current directory.

In the second format, the change is to the directory path in which the character string matching old is replaced with new in the path name of the current directory.

Arguments

directory-path

Specifies the new directory path.

If this argument is omitted, the change is to the user's home directory (HOME variable). If a hyphen (-) is specified for this argument, the change is to the previous working directory (OLDPWD variable).

old

Specifies a character string that is to be replaced in the path name of the current directory.

new

Specifies the character string that is to replace the specified character string in the path name of the current directory.

Return codes

Return code

Meaning

0

Normal termination

1

Error termination

Notes

Usage example