Skip to content

Instantly share code, notes, and snippets.

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 sodonnell/cb46ddca107f24762b13f8f85f0afdbc to your computer and use it in GitHub Desktop.
Save sodonnell/cb46ddca107f24762b13f8f85f0afdbc to your computer and use it in GitHub Desktop.
Using find and perl to replace strings in (all) .php files within a directory tree.
find ./ *.php -exec perl -pi -e 's/\/old\/tree\/path/\/new\/path\/tree/' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment