Ubuntu Bulk File Rename

sudo apt install rename
IMG_0001.JPG
IMG_0002.JPG
IMG_0003.JPG
rename 's/^/A/' *JPG
# AIMG_0001.JPG
# AIMG_0002.JPG
# AIMG_0003.JPG
rename 's/^A//' *JPG
# IMG_0001.JPG
# IMG_0002.JPG
# IMG_0003.JPG
rename 's/$/bak/' *JPG
# IMG_0001.JPG.bak
# IMG_0002.JPG.bak
# IMG_0003.JPG.bak
rename 's/_/-/g' *JPG
# IMG-0001.JPG
# IMG-0002.JPG
# IMG-0003.JPG

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin FOO

Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.