Skip to content

Instantly share code, notes, and snippets.

@D4R4
Created April 1, 2019 07:09
Show Gist options
  • Save D4R4/43a8ea65c8fffec1e87d099eccb8e6a7 to your computer and use it in GitHub Desktop.
Save D4R4/43a8ea65c8fffec1e87d099eccb8e6a7 to your computer and use it in GitHub Desktop.
find and replace str in filename in a directory recursively
find . -name '*StR1*' -type f -exec bash -c 'mv "$1" "${1/StR1/StR2}"' -- {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment