<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
This one worked like a champ:<br>
<br>
find /home/mydir -name "*.zip" -type f -exec rm {} \;<br>
<br>
Whereas this one produced an error:<br>
<br>
find /home/mydir -name "*.zip" -type f -print0 | xargs -0 rm
<br>
<br>
Many thanks!<br>
<br>
Todd<br>
<br>
Joshua Baker-LePain wrote:
<blockquote
 cite="midPine.LNX.4.62.0608042057240.4795@chaos.egr.duke.edu"
 type="cite">On Fri, 4 Aug 2006 at 5:17pm, Hugh E Cruickshank wrote
  <br>
  <br>
  <blockquote type="cite">From: Seán O Sullivan Sent: August 4, 2006
17:10
    <br>
    <blockquote type="cite"><br>
Todd Cary wrote:
      <br>
      <blockquote type="cite">I want to delete all files that have the
pattern of "*.zip" in the
        <br>
directory /home/mydir and all sub-directories.
        <br>
      </blockquote>
find /home/mydir -name "*.zip" -type f -print0 | xargs -0 rm
      <br>
      <br>
    </blockquote>
    <br>
Or: find /home/mydir -name "*.zip" -type f -exec rm {} \;
    <br>
  </blockquote>
  <br>
To complete the discussion, the first form should be faster, as it will
only spawn 1 rm command rather than one for every result of 'find'. 
This can make a big difference if a lot of results are expected.
  <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
CentOS mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS@centos.org">CentOS@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="65">-- 
Ariste Software
2200 D Street Ext
Petaluma, CA 94952
(707) 773-4523
</pre>
</body>
</html>