CD Command

HSI Version: 



Changes working directory DIR0-9. 



Command Format: 

cd[0..9] [drive:]path : change a working directory path
cd -?                 : print usage message


0 .. 9 Working directory number. 0 is used if the directory number is not specified. 

drive: Specifies the logical drive connection to be used. Note that although the path for the connection is changed, this command does not change the active connection. Use the "drive:" (or "connection:" or "switch") commands to change the active connection)

"cd" with no parameters is semantically equal to "cd0 ~". The following are exactly equivalent:

cd0 or cd - or cd ~



Usage Notes: 

The user must have execute permission for the target directory (and all component directories in the full path), or the command will fail.

HSI extends the standard Unix notion of working directory to provide 10 direcotory paths, each of which can contain a separate pathname. 

A shorthand notation (called prime notation) is used to reference each working directory, using the form: n'> where n is a number between 0 and 9. Directory 0 (0') always refers to the current working directory. See Chapter 5: Tree Structures, Directories, and Paths for more information. 

Wildcards may be used to pattern match the directory name, so long as the pattern matches exactly one name.

See UNIX-style Pathname Notation for notes on the use of ".", "..", and "~" as pathname prefixes.


Change to the "Projects" directory within the user's home directory:

cd ~/Projects

Another way to do the same thing, using prime notation. The "set" command changes the value of working directory 1. The "cd" then uses the contents of working directory 1 to change the contents of working directory 0, which is the default working directory. 

set d1=~Projects;cd 1'

Related Command(s):