如何在 Linux 搜尋目錄下包含某字串的檔案,並將字串替換為其他字串?

六月 21st, 2007 | 2,416 Views |  

這也是一個常常用到的功能….方法如下:

find ./ -type f -exec sed -i ’s/string1/string2/’ {} \;

string1 是要找的字串,string2 是要替換成的字串。

Web just-blog.net

Leave a Reply