?? restricted.sh
字號:
#!/bin/bash# Starting the script with "#!/bin/bash -r"#+ runs entire script in restricted mode.echoecho "Changing directory."cd /usr/localecho "Now in `pwd`"echo "Coming back home."cdecho "Now in `pwd`"echo# Everything up to here in normal, unrestricted mode.set -r# set --restricted has same effect.echo "==> Now in restricted mode. <=="echoechoecho "Attempting directory change in restricted mode."cd ..echo "Still in `pwd`"echoechoecho "\$SHELL = $SHELL"echo "Attempting to change shell in restricted mode."SHELL="/bin/ash"echoecho "\$SHELL= $SHELL"echoechoecho "Attempting to redirect output in restricted mode."ls -l /usr/bin > bin.filesls -l bin.files # Try to list attempted file creation effort.echoexit 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -