Skip to content

Instantly share code, notes, and snippets.

@jirkafm
Created February 24, 2021 06:42
Show Gist options
  • Save jirkafm/e75fc12705231f154d442b8cecdc4841 to your computer and use it in GitHub Desktop.
Save jirkafm/e75fc12705231f154d442b8cecdc4841 to your computer and use it in GitHub Desktop.
Batch renaming with find and mv
# 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