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

Write With Us

Portainer, Docker friend for command line haters

Introduction to GraphQL & BigCommerce

How Different is Web 3.0 from Web 2.0?

Random UUID

Tips For Effective Software Testing

Simple and quick Jupyter notebook environment setup

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

Create your Custom Commands 🛠️

How to Build and Install Latest cURL Version on Ubuntu

How to install PPTP on Ubuntu Server and CentOS Server.

Bluetooth Low Energy (BLE) Tutorial for Beaglebone using BleuIO