在脚本中使用sudo

在脚本中使用sudo
echo 'passward' | sudo -S cp file1 /etc/hosts

posted @ 2022-07-28 16:17  hiccup_lh  阅读(103)  评论(0编辑  收藏  举报