I'd just like to offer one small improvement that will speed it up by a
factor of, oh, a magnitude or so:

find . -exec blah blah \;       # 1.

is quite different from:
find . -print | xargs blah blah # 2.

In case 1. you are forking a seperate process for each file that matches.
In case 2. you are forking one process for as many files as you can fit on
a command line. Get it?

So change the cat_and_rm function to process a list and run the find pipe
to xargs.


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to