Skip to content

Instantly share code, notes, and snippets.

@diegodorado
Last active November 26, 2019 01:01
Show Gist options
  • Save diegodorado/4577290 to your computer and use it in GitHub Desktop.
Save diegodorado/4577290 to your computer and use it in GitHub Desktop.
rename -n 's/\.JPG$/\.jpg/' *
# -n for testing... doesnt actually rename
rename -v 's/\.JPG$/\.jpg/' *
# -v, to be verbose, so you see what and how it is renamed
#one liner rename ordered files
ls | cat -n | while read n f; do mv "$f" `printf "%02d.wav" $n`; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment