File extensions in a dir

Hi All,

Is there a way to list all file extensions in a directory and its recursive dirs?

Thanks

I was going to say "find ./ -name *.doc -print" but on second reading, do you want a list of all the unique extensions?

it's not only *.doc.. dir might contain any file exntensions.. I just thought to list just the file extensions..

---------- Post updated at 06:28 AM ---------- Previous update was at 04:18 AM ----------

for ex:

directory1
------->a.java
------->sdd.txt
------->dcdssss.sh
------->dir2_inside_dir1
--->damcda.cckkk
--->cdcnld.abc

So what i am looking is actually to tell me the file extns in directory1
java,txt,sh,cckkk,abc

find /path/to/ -type f | awk -F\. '$NF !~ /^\//{a[$NF]++}END{for(i in a)print i}'
find ./ -type f|sed -n 's/.*\///;s/.*\.//p'|sort -u

thanks danmero and scrutinizer,, ur soln works great..