Rename all .htm files in one directory to .html
This will rename all *.htm files in the current directory and its subdirectories to *.html files. See the Linux manual pages "man bash", "man find", "man mv", "man sed" and "man pcrepattern".
All filename results from find are piped line by line to read and then processed by mv, editing the new filename with sed. This ensures that all paths with whitespace characters are processed correctly.
find . -type f -name '*.htm' | while read filename; do mv -v "${filename}" "`echo "${filename}" | sed -e 's/\.htm$/\.html/'`"; done
