Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sodonnell/cb46ddca107f24762b13f8f85f0afdbc to your computer and use it in GitHub Desktop.

Select an option

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