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

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/cd.1.man.txt
          +++ new/usr/src/man/man1/cd.1.man.txt
↓ open down ↓ 1 lines elided ↑ open up ↑
   2    2  
   3    3  
   4    4  
   5    5  NAME
   6    6         cd, chdir, pushd, popd, dirs - change working directory
   7    7  
   8    8  SYNOPSIS
   9    9         /usr/bin/cd [directory]
  10   10  
  11   11  
  12      -   sh
  13      -       cd [argument]
  14      -
  15      -
  16      -       chdir [argument]
  17      -
  18      -
  19   12     csh
  20   13         cd [dir]
  21   14  
  22   15  
  23   16         chdir [dir]
  24   17  
  25   18  
  26   19         pushd [+n | dir]
  27   20  
  28   21  
  29   22         popd [+n]
  30   23  
  31   24  
  32   25         dirs [-l]
  33   26  
  34   27  
  35      -   ksh, ksh93
       28 +   ksh93
  36   29         cd [-L] [-P] [arg]
  37   30  
  38   31  
  39   32         cd old new
  40   33  
  41   34  
  42   35  DESCRIPTION
  43   36     /usr/bin/cd
  44   37         The /usr/bin/cd utility changes the current directory in the context of
  45   38         the cd utility only. This is in contrast to the version built into the
  46   39         shell. /usr/bin/cd has no effect on the invoking process but can be
  47   40         used to determine whether or not a given directory can be set as the
  48   41         current directory.
  49   42  
  50      -   sh
  51      -       The Bourne shell built-in cd changes the current directory to argument.
  52      -       The shell parameter HOME is the default argument.  The shell parameter
  53      -       CDPATH defines the search path for the directory containing argument.
  54      -       Alternative directory names are separated by a colon (:). The default
  55      -       path is <null> (specifying the current directory).  The current
  56      -       directory is specified by a null path name, which can appear
  57      -       immediately after the equal sign or between the colon delimiters
  58      -       anywhere else in the path list. If argument begins with `/', `.', or
  59      -       `..', the search path is not used. Otherwise, each directory in the
  60      -       path is searched for argument. cd must have execute (search) permission
  61      -       in argument. Because a new process is created to execute each command,
  62      -       cd would be ineffective if it were written as a normal command;
  63      -       therefore, it is recognized by and is internal to the shell. (See
  64      -       pwd(1), sh(1), and chdir(2)).
  65      -
  66      -
  67      -       chdir is just another way to call cd.
  68      -
  69   43     csh
  70   44         If dir is not specified, the C shell built-in cd uses the value of
  71   45         shell parameter HOME as the new working directory. If dir specifies a
  72   46         complete path starting with `/', `.', or `..', dir becomes the new
  73   47         working directory. If neither case applies, cd tries to find the
  74   48         designated directory relative to one of the paths specified by the
  75   49         CDPATH shell variable. CDPATH has the same syntax as, and similar
  76   50         semantics to, the PATH shell variable. cd must have execute (search)
  77   51         permission in dir. Because a new process is created to execute each
  78   52         command, cd would be ineffective if it were written as a normal
↓ open down ↓ 28 lines elided ↑ open up ↑
 107   81  
 108   82         +n
 109   83               Discard the n'th entry in the stack.
 110   84  
 111   85  
 112   86  
 113   87         dirs prints the directory stack, most recent to the left; the first
 114   88         directory shown is the current directory. With the -l argument, produce
 115   89         an unabbreviated printout; use of the ~ notation is suppressed.
 116   90  
 117      -   ksh, ksh93
       91 +   ksh93
 118   92         The Korn shell built-in cd command can be in either of two forms. In
 119   93         the first form it changes the current directory to arg. If arg is - the
 120   94         directory is changed to the previous directory. The shell variable HOME
 121   95         is the default arg. The environment variable PWD is set to the current
 122   96         directory. If the PWD is changed, the OLDPWD environment variable shall
 123   97         also be changed to the value of the old working directory, that is, the
 124   98         current working directory immediately prior to the call to change
 125   99         directory (cd). The shell variable CDPATH defines the search path for
 126  100         the directory containing arg. Alternative directory names are separated
 127  101         by a colon (:). The default path is null (specifying the current
↓ open down ↓ 23 lines elided ↑ open up ↑
 151  125  
 152  126  
 153  127         The second form of cd substitutes the string new for the string old in
 154  128         the current directory name, PWD and tries to change to this new
 155  129         directory.
 156  130  
 157  131  
 158  132         The cd command cannot be executed by rksh. Because a new process is
 159  133         created to execute each command, cd would be ineffective if it were
 160  134         written as a normal command; therefore, it is recognized by and is
 161      -       internal to the Korn shell. (See pwd(1), sh(1), and chdir(2)).
      135 +       internal to the Korn shell. (See pwd(1), ksh93(1), and chdir(2)).
 162  136  
 163  137  OPERANDS
 164  138         The following operands are supported:
 165  139  
 166  140         directory
 167  141                      An absolute or relative pathname of the directory that
 168  142                      becomes the new working directory. The interpretation of a
 169  143                      relative pathname by cd depends on the CDPATH environment
 170  144                      variable.
 171  145  
↓ open down ↓ 47 lines elided ↑ open up ↑
 219  193               The directory was successfully changed.
 220  194  
 221  195  
 222  196         >0
 223  197               An error occurred.
 224  198  
 225  199  
 226  200  ATTRIBUTES
 227  201         See attributes(5) for descriptions of the following attributes:
 228  202  
 229      -   csh, ksh, sh
      203 +   csh
 230  204  
 231      -
 232      -
 233  205         +--------------------+-------------------+
 234  206         |  ATTRIBUTE TYPE    |  ATTRIBUTE VALUE  |
 235  207         +--------------------+-------------------+
 236  208         |Interface Stability | Committed         |
 237  209         +--------------------+-------------------+
 238  210         |Standard            | See standards(5). |
 239  211         +--------------------+-------------------+
 240  212  
 241  213     ksh93
 242  214  
 243      -
 244      -
 245  215         +--------------------+-----------------+
 246  216         |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE |
 247  217         +--------------------+-----------------+
 248  218         |Interface Stability | Uncommitted     |
 249  219         +--------------------+-----------------+
 250  220  
 251  221  SEE ALSO
 252      -       csh(1), ksh(1), ksh93(1), pwd(1), sh(1), chdir(2), attributes(5),
 253      -       environ(5), standards(5)
      222 +       csh(1), ksh93(1), pwd(1), chdir(2), attributes(5), environ(5),
      223 +       standards(5)
 254  224  
 255  225  
 256  226  
 257      -                                 April 8, 2008                           CD(1)
      227 +                               February 9, 2021                          CD(1)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX