Skip to content

Instantly share code, notes, and snippets.

@jamiehs
Created April 24, 2014 18:06
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 jamiehs/11263917 to your computer and use it in GitHub Desktop.
Save jamiehs/11263917 to your computer and use it in GitHub Desktop.
Recursively loop over all files, then use simple string replacements.
find . -type f -name "file-pattern*" -exec sh -c 'echo mv "$0" "${0/find/replace}"' '{}' \;
#Remove the echo when you're sure this does what you want.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment