How to find all file extensions recursively from a directory?

How about this:

find . -type f -name '*.*' | sed 's|.*\.||' | sort -u

list all extensions and their counts of current and all sub-directories

ls -1R | sed 's/[^\.]*//' | sed 's/.*\.//' | sort | uniq -c

find . -type f | sed 's|.*\.||' | sort -u

Also works on mac.