#!/usr/bin/perl # delete all of the *.xml* files recursively use File::Find qw(find); @ARGV = qw(.) unless @ARGV; find sub { return unless -f; return unless $_ =~ /(.*).xml(.*)/; unlink $_ and warn "deleted $_\n"; }, @ARGV; # it would be good to show all dirs to be deleted # and promp user for 'yes' __END__
In reply to Re: Recursive search and delete
by zentara
in thread Recursive search and delete
by qwerty80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |