BSD 4_4 development
[unix-history] / usr / share / man / cat1 / cd.0
CommitLineData
8204f1ab
C
1CD(1) BSD Reference Manual CD(1)
2
3N\bNA\bAM\bME\bE
4 c\bcd\bd - change working directory
5
6S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
7 c\bcd\bd _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by
8
9D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
10 _\bD_\bi_\br_\be_\bc_\bt_\bo_\br_\by is an absolute or relative pathname which becomes the new work-
11 ing directory. The interpretation of a relative pathname by cd depends
12 on the CDPATH environment variable (see below).
13
14E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
15 The following environment variables affect the execution of cd:
16
17 CDPATH If the _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by operand does not begin with a slash (/) charac-
18 ter, and the first component is not dot (.) or dot-dot (..), c\bcd\bd
19 searches for the directory relative to each directory named in
20 the CDPATH variable, in the order listed. The new working direc-
21 tory is set to the first matching directory found. An empty
22 string in place of a directory pathname represents the current
23 directory. If the new working directory was derived from CDPATH,
24 it will be printed to the standard output.
25
26 HOME If c\bcd\bd is invoked without arguments and the HOME environment vari-
27 able exists and contains a directory name, that directory becomes
28 the new working directory.
29
30 See csh(1) for more information on environment variables.
31
32 The c\bcd\bd utility exits 0 on success, and >0 if an error occurs.
33
34S\bSE\bEE\bE A\bAL\bLS\bSO\bO
35 csh(1), pwd(1), sh(1), chdir(2)
36
37S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS
38 The c\bcd\bd command is expected to be IEEE Std1003.2 (``POSIX'') compatible.
39
404th Berkeley Distribution June 5, 1993 1