hmc 小秘密 -- 也许你知道
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1 hmc用的是什么shell?hscroot 进入后是一个restricted的shell(什么是restrict的shell 我在后面附上bash manual的说明)这个restricted shell是/bin/hmcbash
2 hmc的命令都在/hmcrbin/:/usr/hmcrbin下,hmcrbin下是通用的linux命令,、usrhmcrbin 下是hmc的命令,所以只要ls一下这个目录就知道hmc都要那些命令了。
3 restricted shell禁止用/(也就是绝对路径调命令)但是不限制你用cat和ls等其他的命令来查看绝对路径下的文件。所以上面两条都忘了,知道这个第三条就行了。为什么?你自己想想吧。。。
The Restricted Shell If Bash is started with the name rbash, or the`--restricted'option is supplied at invocation, the shell becomes restricted.A restricted shell is used toset up an environment more controlled than the standard shell.A restricted shell behaves identically to bashwith the exception that the following are disallowed:
∙Changing directories with the cd builtin.
∙Setting or unsetting the values of the SHELL, PATH,ENV, or BASH_ENV variables.
∙Specifying command names containing slashes.
∙Specifying a filename containing a slash as an argument to the .builtin command.
∙Specifying a filename containing a slash as an argument to the `-p'option to the hash builtin command.
∙Importing function definitions from the shell environment at startup.
∙Parsing the value of SHELLOPTS from the shell environment at startup.
∙Redirecting output using the `>', `>|', `<>', `>&',`&>', and `>>' redirection operators.
∙Using the exec builtin to replace the shell with another command.
∙Adding or deleting builtin commands with the`-f' and `-d' options to the enable builtin.
∙Specifying the `-p' option to the command builtin.
∙Turning off restricted mode with `set +r' or `set +o restricted'.
HMC,我一直都是这样用的。
要查什么命令,就“where 关键字”。
要查什么命令,就“where 关键字”
怕你一时大意搞混淆了吧
比如你要删除当前目录下的usr目录本来是rm -rf usr 一不小心写成rm -rf /usr