Skip to content

Instantly share code, notes, and snippets.

@charlesponti
Created September 1, 2015 10:49
Show Gist options
  • Save charlesponti/fdc7491424c674d8d440 to your computer and use it in GitHub Desktop.
Save charlesponti/fdc7491424c674d8d440 to your computer and use it in GitHub Desktop.
Incremental File Rename [Linux]
a=1; for i in *.jpg; do new=$(printf "%d.jpg" "$a"); mv -- "$i" "$new"; let a=a+1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment