Change the present working directory. The tilde, '~', represents your
home directory. The variable PWD will be set with the path of the
current working directory. The variable OLDPWD will be set to the
previous value of PWD. The minus sign, '-', represents your previous
directory. The cd command ignores the value of a CDPATH variable.
Example
=> pwd
/home/ken/ada/bush/doc
=> cd ../src
=> pwd
/home/ken/ada/bush/src
=> cd -
/home/ken/ada/bush/doc
=> cd ~/src
=> pwd
/home/ken/src
Bash equivalent: cd
Perl equivalent: chdir
PHP equivalent: chdir
|