查找一行resolv.conf并将其替换

时间:2019-06-18 17:37:07

标签: linux bash shell sed

如何使用sed将以下resolv.conf的内容-search dev.somedomain.com替换为search dev.somedomain.com dev.someotherdomain.com

sed -i -e 's/search dev.somedomain.com/search dev.somedomain.com dev.someotherdomain.com/g' /etc/resolv.conf 

并看到以下错误,

sed: cannot rename /etc/sedxWtVcI: Device or resource busy

0 个答案:

没有答案