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文件),用此方法替换

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文件),用此方法替换


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3