Created
February 24, 2021 06:42
-
-
Save jirkafm/e75fc12705231f154d442b8cecdc4841 to your computer and use it in GitHub Desktop.
Batch renaming with find and mv
This file contains hidden or 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
# Replace any file with suffix '*IntegrationTest.java' to a same file with '*IT.java' suffix. | |
find . -type f -name '*IntegrationTest.java' -exec sh -c 'x="{}"; mv "$x" "${x%"IntegrationTest.java"}IT.java"' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment