49 lines
956 B
Groff
49 lines
956 B
Groff
.nr X
|
|
.if \nX=0 .ds x} cd 1 "Essential Utilities" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
cd \- change working directory
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\f3cd\f1 [ directory ]
|
|
.fi
|
|
.SH DESCRIPTION
|
|
If
|
|
.I directory
|
|
is not specified, the value of shell parameter
|
|
.B $HOME
|
|
is used as the new working directory.
|
|
If
|
|
.I directory
|
|
specifies a complete path starting with
|
|
.BR / ,
|
|
.BR \&. ,
|
|
.BR \&.. ,
|
|
.I directory
|
|
becomes the new working directory.
|
|
If neither case applies,
|
|
.I cd
|
|
tries to find the designated directory relative to one of the
|
|
paths specified by the
|
|
.B $CDPATH
|
|
shell variable.
|
|
.B $CDPATH
|
|
has the same syntax as, and similar semantics to, the
|
|
.B $PATH
|
|
shell variable.
|
|
.I cd
|
|
must have execute (search) permission in
|
|
.IR directory .
|
|
.PP
|
|
Because a new process is created to execute each command,
|
|
.I cd
|
|
would be ineffective if it were written as a
|
|
normal command;
|
|
therefore, it is recognized and is internal to
|
|
the shell.
|
|
.SH SEE ALSO
|
|
.\" @(#)cd.1 6.2 of 9/2/83
|
|
pwd(1),
|
|
sh(1),
|
|
chdir(2).
|