Linux - Rename jpg to jpg recursively, Find and move the file

Rename jpg to jpg recursively


Recursively rename .JPG to .jpg using standard find and mv command.


find /path/to/images -name '*.JPG' -exec bash -c 'mv "$1" "${1/%.JPG/.jpg}"' -- {} \;


The above command will find all the JPG file and rename it to .jpg file. Here the find command is used to find the JPG file and the mv command is used to rename the file.

The topic on Linux - Rename jpg to jpg recursively is posted by - Malu

Hope you have enjoyed, Linux - Rename jpg to jpg recursivelyThanks for your time

Tech Bluff