Today I needed to rename a bunch of files in linux, instead doing some complex regex stuff I found the nifty little tool mmv It was a delight to use.

In my case I just wanted to remove a part of the file name from IMG_XXXX_CR2_embedded.jpg to IMG_XXXX.jpg, to achieve that I just used the following command:

mmv "*_CR2_embedded.jpg" "#1.jpg"