Skip to content

Instantly share code, notes, and snippets.

@ZtupidTS
Forked from nestserau/move_and_rename.sh
Created January 23, 2023 14:19
Show Gist options
  • Select an option

  • Save ZtupidTS/e685feb54666065d046b7c51e2f4e5ec to your computer and use it in GitHub Desktop.

Select an option

Save ZtupidTS/e685feb54666065d046b7c51e2f4e5ec 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