Skip to content

Instantly share code, notes, and snippets.

@leadscloud
Created September 26, 2016 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leadscloud/05104393b5a6126ee3f895db7b1e586c to your computer and use it in GitHub Desktop.
Save leadscloud/05104393b5a6126ee3f895db7b1e586c to your computer and use it in GitHub Desktop.
批量替换文件夹中的文件中的字符

find /home/wwwroot/ -type f -print0 | xargs -0 sed -i 's/string/replacement/g'

find /home/wwwroot/ -type f -exec sed -i 's/string/replacement/g' {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment