Skip to content

Instantly share code, notes, and snippets.

@albanpeignier
Created June 12, 2011 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albanpeignier/1021387 to your computer and use it in GitHub Desktop.
Save albanpeignier/1021387 to your computer and use it in GitHub Desktop.
Rename numbered files
$ touch 01-test1 02-test2
$ rename -n 's/[0-9][0-9]-(.*)/$1/' *
01-test1 renamed as test1
02-test2 renamed as test2
$ rename 's/[0-9][0-9]-(.*)/$1/' *
$ ls
test1 test2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment