Skip to content

Instantly share code, notes, and snippets.

@prandelicious
Created March 23, 2018 14:17
Show Gist options
  • Save prandelicious/b980d0c7ff31f9705125e34635f45ddc to your computer and use it in GitHub Desktop.
Save prandelicious/b980d0c7ff31f9705125e34635f45ddc to your computer and use it in GitHub Desktop.
Rename a bunch of files
rename -n 's/^[0-9]+ - //' *
@prandelicious
Copy link
Author

Remove -n after testing to actually rename the files

Explanation

  • s/old/new/ replace old with new
  • ^ start of string
  • [0-9]+ some numbers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment