How to change files filetype to lowercase

Here is how to change filetypes of filenames to lowercase on Linux… for example ( JPG to jpg )

find . -name ‘*.*’ -exec sh -c ‘a=$(echo “$0” | sed -r “s/([^.]*)\$/\L\1/”); [ “$a” != “$0” ] && mv “$0” “$a” ‘ {} \;