How to rename file extensions recursively

The rename utility can’t be used recursively, only for file names in the current directory.

Instead, we can combineĀ rename andĀ find like this:

find . -name '*.jpeg' -exec rename 's/\.jpeg$/\.jpg/' {} \;
Advertisements