in reply to Re: Re: Searching a directory tree
in thread Searching a directory tree
I think you're missing the power of the Unix find coomand :) find will not only find the file that you want, but it will also carry out the correct operations on them. find2perl will then fill in the &wanted subroutine with the correct commands to mirror that behaviour. For example, your full find command would be something like this:
find /home/www/*/logs/weekly -exec "gzip {} \| mail me@somewhere \;"
Try passing that to the find2perl command and you'll get stuff in the &wanted subroutine.
See the find man page for more details of cool things you can do with find.
--Perl Training in the UK <http://www.iterative-software.com>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Searching a directory tree
by wylie (Novice) on Aug 10, 2001 at 15:59 UTC |