June 2006
Intermediate to advanced
64 pages
2h 42m
English
cd
cd [-LP] [dir]
cd [-LP] [-]
With no arguments, change to home directory of user.
Otherwise, change working directory to dir.
Bash searches the CDPATH variable first, and then looks in the current
directory for dir. A directory of - stands for the previous
directory.
-LUse the logical path (what the user typed, including
any symbolic links) for cd
.. and the value of PWD. This is the
default.
-PUse the actual filesystem physical path for cd .. and the value of PWD.
$ls -ld /usr/tmp/usr/tmp is a symbolic link lrwxrwxrwx 1 root root 10 Dec 30 2004 /usr/tmp -> ../var/tmp $cd -L /usr/tmpLogical change directory $pwdShow location /usr/tmp Result is logical location $cd -P /usr/tmpPhysical change directory $pwdShow location /var/tmp Result is physical location
Read now
Unlock full access