*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> cd (1)              
Title
Content
Arch
Section
 

CD(1)

Contents


NAME    [Toc]    [Back]

     cd - change working directory

SYNOPSIS    [Toc]    [Back]

     cd [directory]

DESCRIPTION    [Toc]    [Back]

     directory is an absolute or relative pathname which  becomes
the new working
 directory.  The interpretation of a relative pathname by
cd depends
     on the CDPATH environment variable (see below).

     Note that cd is implemented as a built-in shell command  and
not as a
     stand-alone program.  Because each process has its own working directory,
     a separate cd utility would have no effect (it would  change
the directory
     and  exit,  leaving  the working directory in the parent unchanged).  Different
 shells may implement cd with features different  from
those described
  here.   Please consult the manual for your specific
shell.

     The cd command exits 0 on success or  >0  if  an  error  occurred.

ENVIRONMENT    [Toc]    [Back]

     The  following environment variables affect the execution of
cd:

     CDPATH  If the directory operand does not begin with a slash
(`/') character,
  and  the first component is not dot (`.') or
dot-dot
             (`..'), cd searches for the  directory  relative  to
each colon-separated
  directory  named  in the CDPATH variable, in
the order listed.
  The new working directory is set to  the  first
matching directory
 found.  An empty string in place of a directory pathname
             represents the current directory.  If the new  working directory
             was  derived  from CDPATH, it will be printed to the
standard output.
  See sh(1) for details.  Users  of  csh(1)  use
the variable
             cdpath instead.

     HOME     If cd is invoked without arguments and the HOME environment variable
 exists and contains a directory name, that  directory becomes
             the new working directory.

     See  environ(7)  for  more  information on environment variables.

SEE ALSO    [Toc]    [Back]

      
      
     csh(1), pwd(1), sh(1), chdir(2)

STANDARDS    [Toc]    [Back]

     The  cd  command  is  expected  to  be   IEEE   Std   1003.2
(``POSIX.2'') compatible.


OpenBSD      3.6                           June      5,      1993
[ Back ]
 Similar pages
Name OS Title
chdir OpenBSD change current working directory
chdir NetBSD change current working directory
fchdir OpenBSD change current working directory
fchdir NetBSD change current working directory
chdir FreeBSD change current working directory
fchdir FreeBSD change current working directory
mcd Tru64 mtools utility to change or report the DOS working directory
pwd HP-UX working directory name
cd Tru64 Changes the current working directory
getcwd NetBSD get working directory pathname
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service