Extracting the different files from directory & its sub directories

Hi Everyone,

It would be helpful if someone helps me on this.
Requirement:
I have a directory which includes different types of files(for example *.java,*.class),but not restricted for only these types. I need to find the same types of file extensions from its directories and subdirectories and also i need to write the file names in to another file.
Output for the requirement:

File1:
--------
path/x1.java
path/x2.java
File2:
---------
path/x1.class
path/x2.class
File3:
----------
path/y1.jsp
path/y2.jsp

Note: path should be where the file is located.

Thanks in Advance :b:

Would you like to have different output files for each extension?

 
find give_path_here  -type f >temp.lst
while read record
do
a=`echo $record | cut -d "." -f2`
echo $record >>outfile_$a
done<temp.lst

Hi lathavim,

Thnx for the reply. Yes i need different output files for each extension.

Vasu, read the manpage for 'find' on your server and also the manpage for xargs. That should have all the info you need.