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

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

ANDROID FUNDAMENTALS 05.2 : CARDS AND COLORS

Dynamic translations in Outsystems Mobile apps, using MultiLingual plugin — Save the translations…

A Clone Army of the Jenkins Republic

Aave is scaling DeFi with Polygon!

Using JFrog Artifactory and Jenkins to build your container image.

Which Agile Certification is the Best for Me?

Bounty Campaign | Welcome to MetaRising

Encapsulate and abstract for future-proof software

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.

More from Medium

Tunneling with Putty

How to Configure BGP METRIC (MED)

Odoo-15 installation and configuration in PyCharm