Skip to content

Instantly share code, notes, and snippets.

@Rodrigora
Created March 17, 2015 00:38
Show Gist options
  • Save Rodrigora/d3bf1bdeaa1e91ce9d7b to your computer and use it in GitHub Desktop.
Save Rodrigora/d3bf1bdeaa1e91ce9d7b to your computer and use it in GitHub Desktop.
find and replace text in files recursively
# find text in files
grep -r "Text To Search" /path/to/search
# replace text in files
find . -name show.html.erb -exec sed -i "s/Text To Search/Text To Replace/g" {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment