How to remove all files with a certain extension

Julien Cigar jcigar at ulb.ac.be
Mon Apr 6 14:11:13 PDT 2009


On Mon, 2009-04-06 at 16:57 -0400, John Almberg wrote:
> This is a real newbie question, but I can't figure it out...
> 
> I want to remove all .tar files from a directory tree. I think  
> something like the following should work, but I must have something  
> wrong, because it doesn't:
> 
> find . -name *.tar -exec rm /dev/null {} \;
> 

find . -type f -name "*.tar" -delete

> What am I doing wrong?
> 
> Thanks: John
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Université Libre de Bruxelles (ULB)
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
Mail: jcigar at ulb.ac.be
@biobel: http://biobel.biodiversity.be/person/show/471
Tel : 02 650 57 52



More information about the freebsd-questions mailing list