Skip to content

Instantly share code, notes, and snippets.

@FMCorz
Created July 11, 2016 03:13
Show Gist options
  • Save FMCorz/f00fb38d7640d9ce376be8664b896a25 to your computer and use it in GitHub Desktop.
Save FMCorz/f00fb38d7640d9ce376be8664b896a25 to your computer and use it in GitHub Desktop.
Find and replace in files

Find all the .php files in the current directory and below, and replace FROM with TO.

find . -type f -iname '*.php' -exec sed -i 's/FROM/TO/g' {}  \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment