Skip to content

Instantly share code, notes, and snippets.

@phcostabh
Created May 10, 2018 15:11
Show Gist options
  • Save phcostabh/93dcff497ebc6579128f9112ebb8c796 to your computer and use it in GitHub Desktop.
Save phcostabh/93dcff497ebc6579128f9112ebb8c796 to your computer and use it in GitHub Desktop.
Rena files in a folder with sequencial numbers
ls -1tr | cat -n | while read a n; do mv $n $(printf "%02d-%s\n" $a $n); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment