Print this page
13507 some man pages need update following 13405
6308 some man pages are obsolete after moving to ksh builtins

@@ -42,33 +42,21 @@
 .\"
 .\" Copyright 1989 AT&T
 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
 .\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
 .\"
-.TH CD 1 "Apr 8, 2008"
+.TH CD 1 "Feb 9, 2021"
 .SH NAME
 cd, chdir, pushd, popd, dirs \- change working directory
 .SH SYNOPSIS
-.LP
 .nf
 \fB/usr/bin/cd\fR [\fIdirectory\fR]
 .fi
 
-.SS "sh"
-.LP
-.nf
-\fBcd\fR [\fIargument\fR]
-.fi
-
-.LP
-.nf
-\fBchdir\fR [\fIargument\fR]
-.fi
-
 .SS "csh"
-.LP
 .nf
 \fBcd\fR [\fIdir\fR]
 .fi
 
 .LP

@@ -89,12 +77,11 @@
 .LP
 .nf
 \fBdirs\fR [\fB-l\fR]
 .fi
 
-.SS "ksh, ksh93"
-.LP
+.SS "ksh93"
 .nf
 \fBcd\fR [\fB-L\fR] [\fB-P\fR] [\fIarg\fR]
 .fi
 
 .LP

@@ -102,40 +89,16 @@
 \fBcd\fR \fIold\fR \fInew\fR
 .fi
 
 .SH DESCRIPTION
 .SS "/usr/bin/cd"
-.sp
-.LP
 The \fB/usr/bin/cd\fR utility changes the current directory in the context of
 the \fBcd\fR utility only. This is in contrast to the version built into the
 shell. \fB/usr/bin/cd\fR has no effect on the invoking process but can be used
 to determine whether or not a given directory can be set as the current
 directory.
-.SS "sh"
-.sp
-.LP
-The Bourne shell built-in \fBcd\fR changes the current directory to
-\fIargument\fR. The shell parameter \fBHOME\fR is the default \fIargument\fR.
-The shell parameter \fBCDPATH\fR defines the search path for the directory
-containing \fIargument\fR. Alternative directory names are separated by a colon
-(\fB:\fR). The default path is \fB<null>\fR (specifying the current directory).
-The current directory is specified by a null path name, which can appear
-immediately after the equal sign or between the colon delimiters anywhere else
-in the path list. If \fIargument\fR begins with `\fB/\fR', `\fB\&.\fR', or
-`\fB\&.\|.\fR', the search path is not used. Otherwise, each directory in the
-path is searched for \fIargument\fR. \fBcd\fR must have execute (search)
-permission in \fIargument\fR. Because a new process is created to execute each
-command, \fBcd\fR would be ineffective if it were written as a normal command;
-therefore, it is recognized by and is internal to the shell. (See \fBpwd\fR(1),
-\fBsh\fR(1), and \fBchdir\fR(2)).
-.sp
-.LP
-\fBchdir\fR is just another way to call \fBcd\fR.
 .SS "csh"
-.sp
-.LP
 If \fIdir\fR is not specified, the C shell built-in \fBcd\fR uses the value of
 shell parameter \fBHOME\fR as the new working directory. If \fIdir\fR specifies
 a complete path starting with `\fB/\fR', `\fB\&.\fR', or `\fB\&.\|.\fR',
 \fIdir\fR becomes the new working directory. If neither case applies, \fBcd\fR
 tries to find the designated directory relative to one of the paths specified

@@ -158,20 +121,20 @@
 \fBpushd\fR pushes a directory onto the directory stack. With no arguments,
 exchange the top two elements.
 .sp
 .ne 2
 .na
-\fB\fB+\fR\fIn\fR\fR
+\fB+\fR\fIn\fR
 .ad
 .RS 7n
 Rotate the \fIn\fR'th entry to the top of the stack and \fBcd\fR to it.
 .RE
 
 .sp
 .ne 2
 .na
-\fB\fIdir\fR\fR
+\fB\fIdir\fR
 .ad
 .RS 7n
 Push the current working directory onto the stack and change to \fIdir\fR.
 .RE
 

@@ -180,11 +143,11 @@
 \fBpopd\fR pops the directory stack and \fBcd\fR to the new top directory. The
 elements of the directory stack are numbered from 0 starting at the top.
 .sp
 .ne 2
 .na
-\fB\fB+\fR\fIn\fR\fR
+\fB+\fR\fIn\fR
 .ad
 .RS 6n
 Discard the \fIn\fR'th entry in the stack.
 .RE
 

@@ -191,13 +154,11 @@
 .sp
 .LP
 \fBdirs\fR prints the directory stack, most recent to the left; the first
 directory shown is the current directory. With the \fB-l\fR argument, produce
 an unabbreviated printout; use of the \fB~\fR notation is suppressed.
-.SS "ksh, ksh93"
-.sp
-.LP
+.SS "ksh93"
 The Korn shell built-in \fBcd\fR command can be in either of two forms. In the
 first form it changes the current directory to \fIarg\fR. If \fIarg\fR is
 \fB\(mi\fR the directory is changed to the previous directory. The shell
 variable \fBHOME\fR is the default \fIarg\fR. The environment variable
 \fBPWD\fR is set to the current directory. If the \fBPWD\fR is changed, the

@@ -215,21 +176,21 @@
 pathname formed by the concatenation of the value of PWD, a slash character,
 and arg.
 .sp
 .ne 2
 .na
-\fB\fB-L\fR\fR
+\fB-L\fR
 .ad
 .RS 6n
 Handles the operation dot-dot (\fB\&..\fR) logically. Symbolic link components
 are \fBnot\fR resolved before dot-dot components are processed.
 .RE
 
 .sp
 .ne 2
 .na
-\fB\fB-P\fR\fR
+\fB-P\fR
 .ad
 .RS 6n
 Handles the operand dot-dot physically. Symbolic link components \fBare\fR
 resolved before dot-dot components are processed.
 .RE

@@ -247,47 +208,41 @@
 .sp
 .LP
 The \fBcd\fR command cannot be executed by \fBrksh\fR. Because a new process is
 created to execute each command, \fBcd\fR would be ineffective if it were
 written as a normal command; therefore, it is recognized by and is internal to
-the Korn shell. (See \fBpwd\fR(1), \fBsh\fR(1), and \fBchdir\fR(2)).
+the Korn shell. (See \fBpwd\fR(1), \fBksh93\fR(1), and \fBchdir\fR(2)).
 .SH OPERANDS
-.sp
-.LP
 The following operands are supported:
 .sp
 .ne 2
 .na
-\fB\fIdirectory\fR\fR
+\fB\fIdirectory\fR
 .ad
 .RS 13n
 An absolute or relative pathname of the directory that becomes the new working
 directory. The interpretation of a relative pathname by \fBcd\fR depends on the
 \fBCDPATH\fR environment variable.
 .RE
 
 .SH OUTPUT
-.sp
-.LP
 If a non-empty directory name from \fBCDPATH\fR is used, an absolute pathname
 of the new working directory is written to the standard output as follows:
 .sp
 .LP
 \fB"%s\en"\fR, <\fInew directory\fR>
 .sp
 .LP
 Otherwise, there is no output.
 .SH ENVIRONMENT VARIABLES
-.sp
-.LP
 See \fBenviron\fR(5) for descriptions of the following environment variables
 that affect the execution of \fBcd\fR: \fBLANG\fR, \fBLC_ALL\fR,
 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 .sp
 .ne 2
 .na
-\fB\fBCDPATH\fR\fR
+\fBCDPATH\fR
 .ad
 .RS 10n
 A colon-separated list of pathnames that refer to directories. If the
 \fIdirectory\fR operand does not begin with a slash \fB(\fR \fB/\fR \fB)\fR
 character, and the first component is not dot or dot-dot, \fBcd\fR searches for

@@ -299,66 +254,59 @@
 .RE
 
 .sp
 .ne 2
 .na
-\fB\fBHOME\fR\fR
+\fBHOME\fR
 .ad
 .RS 10n
 The name of the home directory, used when no \fIdirectory\fR operand is
 specified.
 .RE
 
 .sp
 .ne 2
 .na
-\fB\fBOLDPWD\fR\fR
+\fBOLDPWD\fR
 .ad
 .RS 10n
 A pathname of the previous working directory, used by \fBcd-\fR.
 .RE
 
 .sp
 .ne 2
 .na
-\fB\fBPWD\fR\fR
+\fBPWD\fR
 .ad
 .RS 10n
 A pathname of the current working directory, set by \fBcd\fR after it has
 changed to that directory.
 .RE
 
 .SH EXIT STATUS
-.sp
-.LP
 The following exit values are returned by \fBcd\fR:
 .sp
 .ne 2
 .na
-\fB\fB0\fR\fR
+\fB0\fR
 .ad
 .RS 6n
 The directory was successfully changed.
 .RE
 
 .sp
 .ne 2
 .na
-\fB\fB>0\fR\fR
+\fB>0\fR
 .ad
 .RS 6n
 An error occurred.
 .RE
 
 .SH ATTRIBUTES
-.sp
-.LP
 See \fBattributes\fR(5) for descriptions of the following attributes:
-.SS "csh, ksh, sh"
-.sp
-
-.sp
+.SS "csh"
 .TS
 box;
 c | c
 l | l .
 ATTRIBUTE TYPE  ATTRIBUTE VALUE

@@ -367,13 +315,10 @@
 _
 Standard        See \fBstandards\fR(5).
 .TE
 
 .SS "ksh93"
-.sp
-
-.sp
 .TS
 box;
 c | c
 l | l .
 ATTRIBUTE TYPE  ATTRIBUTE VALUE

@@ -380,9 +325,7 @@
 _
 Interface Stability     Uncommitted
 .TE
 
 .SH SEE ALSO
-.sp
-.LP
-\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBpwd\fR(1), \fBsh\fR(1),
+\fBcsh\fR(1), \fBksh93\fR(1), \fBpwd\fR(1),
 \fBchdir\fR(2), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)