13Jan/100
Recursively Rename Files Linux
I was just doing this today and thought I would post the bash script I wrote to do the job. This particular example finds all jpeg files recursively and renames them to .jpg but you could just change the .jpeg part to anything and / or the .jpg part.
You just have to paste this into a .sh file and run it with sh filename.sh or set it's executable bit and run it with ./filename.sh
#!/bin/bash find ./ -type f -name "*.jpeg" | while read FILEdonewname=`echo $FILE | sed s/\.jpeg$/\.jpg/`echo "renaming $FILE to $newname"mv "$FILE" "$newname"done