cd [ -qsLP ] [ arg ]
cd [ -qsLP ] old new
cd [ -qsLP ] {+|-}n
       Change the current directory.  In the  first  form,
       current  directory to arg, or to the value of $HOME
       specified.  If arg is `-', change to  the  previous

       Otherwise,  if  arg begins with a slash, attempt to
       directory given by arg.

       If  arg  does  not  begin with a slash, the  behav-
       whether  the  current  directory  `.' occurs in the
       ries  contained  in the shell parameter cdpath.  If
       first  attempt to change to the directory arg under
       directory,  and  if that fails but  cdpath  is  set
       least one element attempt to change to the directo-
       each  component  of  cdpath  in  turn   until  suc-
       occurs  in cdpath, then cdpath is searched strictly
       that `.' is only tried at the appropriate point.

       The  order  of testing cdpath is  modified  if  the
       is  set,  as described in the documentation for the

       If no directory is found, the option CDABLE VARS is
       parameter   named  arg  exists  whose  value begins
       treat its value as the directory.   In  that  case,
       is added to the named directory hash table.

       The   second  form of cd substitutes the string new
       old in the name of the current directory, and tries
       this new directory.

       The third form of cd extracts an entry from the di-
       and changes to that  directory.   An  argument   of
       identifies   a   stack  entry  by counting from the
       shown by the dirs command, starting with zero.   An
       the  form `-n' counts from the right.  If the PUSHD
       is set, the meanings of `+' and `-' in this context

       If  the  -q  (quiet)  option is specified, the hook
       and  the  functions in the  array  chpwd  functions
       This  is  useful for calls to cd that do not change
       ment seen by an interactive user.

       If  the -s  option  is  specified,  cd  refuses  to
       directory  if the given pathname contains symlinks.
       option is given or the CHASE LINKS option  is  set,
       are  resolved to their true values.  If the -L  op-
       symbolic  links are retained in the directory  (and
       regardless of the state of the CHASE LINKS option.

chdir  Same as cd.
