You can do something like this:

find . -name "*.class" -exec rm {} \;

This will find all the class files (including the sub-directories) and
remove them.

Nishi

--People who live in windowed environments shouldn't cast pointers--
mailto:[EMAIL PROTECTED]   http://www.c3ipros.com/nkapoor
-----------------------------------~~~------------------------------

> -----Original Message-----
> From: David Warnock [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, September 14, 1998 2:17 PM
> To:   java-linux
> Subject:      Delete all class files
> 
> Hi,
> 
> I am using Jikes 0.37 and whilst I trust it's -depends option I like to
> delete all class files prior to building a release. I am also very new
> to Linux and cannot see how to delete *.class files from a directory
> tree. Under windows NT I could use "del *.class /s" but "rm -r *.class"
> does not work.
> 
> I thought I should be able to connect "find . -name *.class" to "rm"
> somehow using redirection or pipes but cannot get it to work.
> 
> Any ideas on how I should do this?
> 
> Thanks
> 
> Dave

Reply via email to