Skip to content

Instantly share code, notes, and snippets.

@BCadet
Last active May 2, 2022 09:58
Show Gist options
  • Save BCadet/67ec7fc66e3d6962f5c6d41913d76ef1 to your computer and use it in GitHub Desktop.
Save BCadet/67ec7fc66e3d6962f5c6d41913d76ef1 to your computer and use it in GitHub Desktop.
Bash command to rename files recursively
#/bin/bash
find . -name 'orig*' -type f -exec bash -c 'mv "$1" "${1/\/orig_/\/new_}"' -- {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment