| Rev | Line | |
|---|
| [25] | 1 | '\" |
|---|
| 2 | '\" Copyright (c) 1993 The Regents of the University of California. |
|---|
| 3 | '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. |
|---|
| 4 | '\" |
|---|
| 5 | '\" See the file "license.terms" for information on usage and redistribution |
|---|
| 6 | '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
|---|
| 7 | '\" |
|---|
| 8 | '\" RCS: @(#) $Id: cd.n,v 1.9 2007/12/13 15:22:32 dgp Exp $ |
|---|
| 9 | '\" |
|---|
| 10 | .so man.macros |
|---|
| 11 | .TH cd n "" Tcl "Tcl Built-In Commands" |
|---|
| 12 | .BS |
|---|
| 13 | '\" Note: do not modify the .SH NAME line immediately below! |
|---|
| 14 | .SH NAME |
|---|
| 15 | cd \- Change working directory |
|---|
| 16 | .SH SYNOPSIS |
|---|
| 17 | \fBcd \fR?\fIdirName\fR? |
|---|
| 18 | .BE |
|---|
| 19 | |
|---|
| 20 | .SH DESCRIPTION |
|---|
| 21 | .PP |
|---|
| 22 | Change the current working directory to \fIdirName\fR, or to the |
|---|
| 23 | home directory (as specified in the HOME environment variable) if |
|---|
| 24 | \fIdirName\fR is not given. |
|---|
| 25 | Returns an empty string. |
|---|
| 26 | Note that the current working directory is a per-process resource; the |
|---|
| 27 | \fBcd\fR command changes the working directory for all interpreters |
|---|
| 28 | and (in a threaded environment) all threads. |
|---|
| 29 | .SH EXAMPLES |
|---|
| 30 | Change to the home directory of the user \fBfred\fR: |
|---|
| 31 | .CS |
|---|
| 32 | \fBcd\fR ~fred |
|---|
| 33 | .CE |
|---|
| 34 | .PP |
|---|
| 35 | Change to the directory \fBlib\fR that is a sibling directory of the |
|---|
| 36 | current one: |
|---|
| 37 | .CS |
|---|
| 38 | \fBcd\fR ../lib |
|---|
| 39 | .CE |
|---|
| 40 | |
|---|
| 41 | .SH "SEE ALSO" |
|---|
| 42 | filename(n), glob(n), pwd(n) |
|---|
| 43 | |
|---|
| 44 | .SH KEYWORDS |
|---|
| 45 | working directory |
|---|
Note: See
TracBrowser
for help on using the repository browser.