hmc 小秘密 -- 也许你知道

2019-02-26 10:21

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


hmc 小秘密 -- 也许你知道.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:高三地理专题 - 3S技术专题复习 - 图文

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: