Skip to content

Instantly share code, notes, and snippets.

@nestserau
Last active January 23, 2023 14:19
Show Gist options
  • Save nestserau/1e3f425e5fc09932026a to your computer and use it in GitHub Desktop.
Save nestserau/1e3f425e5fc09932026a to your computer and use it in GitHub Desktop.
bash: Move and rename multiple files
find /path/to/directory -name "*.ext" -exec bash -c 'mv {} $(echo {} | sed -e "s/foo/bar/")' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment