分页: 1 / 1

分享:终端强大的help shell内建命令

发表于 : 2012-12-13 18:27
nexus-s
直接上命令~~

代码: 全选

$ man cd
$ type cd
$ help cd
cd is a shell builtin 这些不能man的基本上都是shell内建命令,直接help $ help help
比如你想知道经常看到有人用set -e或者 set -x是啥意思,与其谷歌不如看文档直接$ help set | less
结果如下:
-e Exit immediately if a command exits with a non-zero status.
解说:什么是a non-zero status非零状态,shell命令和脚本执行有两个结果,一个是zero:命令执行成功;另一个是nonzero:命令执行失败。
参考http://www.freeos.com/guides/lsst/ch02sec09.html
-x Print commands and their arguments as they are executed.
-x基本上是用在调试环境中
当然要学好英文~~
:em02

Re: 分享:终端强大的help shell内建命令

发表于 : 2012-12-13 20:48
YeLee
顶一个。 :em11 :em11 :em11