Skip to content

Instantly share code, notes, and snippets.

@flee2free
Last active April 11, 2021 14:25
Show Gist options
  • Save flee2free/367ec6193df796e650f23248b5007853 to your computer and use it in GitHub Desktop.
Save flee2free/367ec6193df796e650f23248b5007853 to your computer and use it in GitHub Desktop.
[Terminal File Rename] Renaming files in sequece using numeric sort #bash
ls | sort -n | rename -n 's/.+/our $i; sprintf("%02d.jpeg", 1+$i++)/e'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment