Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用此脚本,我想在 /etc/hosts 文件中附加一行文本。该脚本似乎无法正常工作。怎么了?
su cd /etc cat /home/rugile/file >> hosts
/home/rugile/file 看起来像这样:
127.0.0.1 domain.com
su打开一个新的外壳。您需要向它提供命令。
su
su << EOF ... EOF