随笔分类 - shell
shell
shell5
摘要:su alice :切换到alice账户,但是shell的环境没有改变,还是在root下,但是alice可能没有访问root目录下内容的权限,处于没有登录用户alice状态,叫noLogin shell; su - alice:切换到alice账户,并且shell环境切换到alice目录下,处于登录
阅读全文
shell-3
摘要:shell脚本中请来Python执行Python脚本: #!/usr/bin/bash ping -c1 www.baidu.com &>/dev/null && echo "www.baidu.com is up" || echo "www.baiud.com is down" /usr/bin/
阅读全文
shell-1
摘要:vim ping01.sh #!/usr/bin/bashping -c1 www.baidu.com &>/dev/null && echo "www.baidu.com is up" || echo "www.baiud.com is down" 其中 #!/usr/bin/bash 为脚本解释
阅读全文