Linux下利用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 当大批文件被挂马时(挂js文件),用此方法替换。
顶(0)
踩(0)
下一篇:定制个性化的bash
- 最新评论
