Skip to content

Instantly share code, notes, and snippets.

@jesstess
Created February 1, 2012 22:31
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 jesstess/1719886 to your computer and use it in GitHub Desktop.
Save jesstess/1719886 to your computer and use it in GitHub Desktop.
Change all instances of foo to bar in this directory, excluding files in .git or its subdirectories
find . -not \( -name .git -prune \) -type f -print0 | xargs -0 sed -i 's/foo/bar/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment