cd命令帮助原文
~]# help cd
cd: cd [-L|[-P [-e]]] [dir]
Change the shell working directory.
更改shell工作目录。
Change the current directory to DIR.
将当前目录更改为DIR。
The default DIR is the value of the HOME shell variable.
DIR的默认值是shell变量HOME的值。
The variable CDPATH defines the search path for the directory containing DIR.
变量CDPATH定义了包含DIR在内的目录的搜索路径。
Alternative directory names in CDPATH are separated by a colon (:).
CDPATH中的其他目录名由冒号(:)分隔。
A null directory name is the same as the current directory.
空目录名称与当前目录相同。
If DIR begins with a slash (/), then CDPATH is not used.
如果DIR以斜杠(/)开头,则不使用CDPATH。
If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be a variable name.
如果没有找到该目录,并且设置了shell选项 'cdable_vars',则假设单词是一个变量名。
If that variable has a value,its value is used for DIR.
如果该变量有值,则将其值用于DIR
Options:
-L force symbolic links to be followed
-P use the physical directory structure without following symbolic links
-e if the -P option is supplied, and the current working directory cannot be determined successfully, exit with a non-zero status
选项:
-L 强制使用符号链接
-P 使用物理目录结构,不使用符号链接
-e 如果提供了-P选项,并且无法成功确定当前工作目录,则以非零状态退出
The default is to follow symbolic links, as if `-L' were specified.
默认情况下使用符号链接,就像指定了'-L'一样。
Exit Status:
Returns 0 if the directory is changed, and if $PWD is set successfully when -P is used; non-zero otherwise.
退出状态:
如果目录更改成功,或者当使用了-P参数选项时,$PWD成功设置后,返回0;否则返回非零。