Skip to content

Instantly share code, notes, and snippets.

@miguelSantirso
Created April 19, 2014 15:19
Show Gist options
  • Save miguelSantirso/11087384 to your computer and use it in GitHub Desktop.
Save miguelSantirso/11087384 to your computer and use it in GitHub Desktop.
OS X Terminal batch rename
# Type this directly into terminal
# Renames *.aaa to *.bbb
for file in *.aaa
do
mv "$file" "${file/.aaa/.bbb}"
done
# This works:
for file in **/*.aaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment