<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: find code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Mon, 06 Oct 2008 06:35:47 GMT</pubDate>
    <description>DZone Snippets: find code</description>
    <item>
      <title>Clearing out a bunch of spam with spoofed emails that were bounced back to some poor guy with a catchall email</title>
      <link>http://snippets.dzone.com/posts/show/219</link>
      <description>We don't really want to delete them all just in case.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd /usr/local/scratch/&lt;br /&gt;mkdir junk&lt;br /&gt;find /var/spool/postfix -exec grep "somediscernible-feature.com" '{}' \; | awk '{print($3)}' | xargs -J X mv X ./junk/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The "find" produces&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Binary file /var/spool/postfix/active/D/D8832E38 matches&lt;br /&gt;Binary file /var/spool/postfix/active/D/D78EC1C72 matches&lt;br /&gt;Binary file /var/spool/postfix/active/D/D593D279D matches&lt;br /&gt;Binary file /var/spool/postfix/active/D/D0EB32833 matches&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The awk&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/var/spool/postfix/active/D/D8832E38&lt;br /&gt;/var/spool/postfix/active/D/D78EC1C72&lt;br /&gt;/var/spool/postfix/active/D/D593D279D&lt;br /&gt;/var/spool/postfix/active/D/D0EB32833&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And then the mv, moves it.</description>
      <pubDate>Sat, 23 Apr 2005 17:53:38 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/219</guid>
      <author>jason (Jason Hoffman)</author>
    </item>
  </channel>
</rss>
