Created
July 12, 2019 18:48
-
-
Save jamiehs/74d084e875a7f9761c6b587456ae6086 to your computer and use it in GitHub Desktop.
Finds files in the current directory based on a file name pattern and then executes a move command while finding and replacing a component of the file name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove echo to execute the actual mv command | |
find . -type f -name "prefix-*.json" -exec bash -c 'echo mv "$1" "${1/find/replace}"' -- {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment