要實現(xiàn)文本內(nèi)容替換我們可以使用find和perl方法
find -name 'xixi.php' |xargs perl -pi -e 's|hello|aa|g'
find -name '*.html' |xargs perl -pi -e 's|aa|hello|g'
find -name '*.html' |xargs perl -pi -e 's|<script src="a.js([^>]*)></script>||g'
Linux 當(dāng)大批文件被掛馬時(掛js文件),用此方法替換
新聞熱點
疑難解答
圖片精選