OLDPWD

OLDPWD ( OLDP RINT W¯¯ 工作会有 d irectory)所包含的最后 cd 命令之前目录:

~> $ cd directory
directory> $ echo $OLDPWD
/home/user