列出目录中所有的扩展名:

find /path/to/dir -type f | grep -o '\.[^./]*$' | sort | uniq