Rename file extensions for all files under current directory and sub directories without any other packages (only use shell script):
Create a shell script rename.sh
under current directory with the following code:
#!/bin/bash
for file in $(find . -name "*$1"); do
mv "$file" "${file%$1}$2"
done
Run it by ./rename.sh .old .new
.
Eg. ./rename.sh .html .txt