%%s 0/0/0 %%d D 1.1 27-Mar-82 14:58:13 v1.1 1 0 %%c Version 1.1 is the Spring 1982 Distribution of the LBL/Hughes release %%c of the Software Tools Virtual Operating System software and documentation. %%T %%I 1 #-h- cd.fmt 2213 asc 25-mar-82 07:41:54 v1.1 (sw-tools v1.1) .so ~bin/manhdr .hd Cd (1) 27-Jul-81 change (current) directory .sy cd [directory] .ds Cd makes the specified directory the current directory, i.e. you are "moved" to the specified directory. If STDOUT is a terminal, the pathname of the resultant directory is displayed. If no directory is specified, the current directory is changed to the most recently visited directory. Some shorthand is allowed to permit easy movement from directories to subdirectories and vice versa. .sp The form of the pathname on the VAX is .sp .ce /\hostname/device/directory/[sub-directory/]filename... .sp Suppose that the current working directory is /\dev/s/tools. If it is desired to change the working directory to /\dev/s/tools/man, then the following command to the shell will work: .sp .ce cd man .sp That is, a name without a preceding slash is appended to the current directory pathname. Now suppose that we wish to change from the present value, /\dev/u/tools/man to /\dev/u/tools/usr. This may be accomplished by the following command: .sp .ce cd \usr .sp That is, `\' is shorthand for backing up one level in the directory hierarchy. Now let's suppose that we wish to change the directory to /\dev/u/usrlib. This may be accomplished by the following command: .sp .ce cd /u/usrlib .sp That is, if the directory specified to cd starts with a `/', but the first directory field does not start with a `\', then the current directory is replaced by the value specified, but on the same node. Finally, let's suppose that one wishes to change the default to /\sim/mlea. This may be accomplished by the following command: .sp .ce cd /\sim/mlea .sp This type of change, where the default directory is on a different machine, is to be avoided, since the scratch files for all of the tools will then be done on the remote machine, and strange results may occur. .fl none .sa ho (move to home directory) .br pwd (print name of current directory) .di An error message is displayed if the specified directory could not be found. .au Cd is usually implemented as a shell command on most systems, since subprocesses cannot generally change the default directory of their parent. Whoever wrote the shell probably wrote Cd also. .bu %%E 1