Shell(二)

shell中使用ssh

ssh root@172.28.38.73    <<remotessh
    ps -ef|grep mongod | grep -v grep
remotessh

shell中切换root权限

#!/bin/bash
sudo su <<EOF
mkdir document;
exit;
EOF

 

posted on 2018-05-24 15:33  冰蓝小猪宝宝  阅读(120)  评论(0编辑  收藏  举报

导航