<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: xargs code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 26 Jul 2008 22:03:09 GMT</pubDate>
    <description>DZone Snippets: xargs code</description>
    <item>
      <title>Parse Exim log file with SpamAssassin score</title>
      <link>http://snippets.dzone.com/posts/show/4590</link>
      <description>&lt;code&gt;&lt;br /&gt;grep '\[Spam score: [1-9]' /var/log/exim/main.log | awk '{print $3}' | xargs -t -i grep {} /var/log/exim/main.log &gt; /var/log/exim/spam_score.log&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;grep 'reporter\.pl' /var/log/exim/main.log | awk '{print $3}' | xargs -t -i grep {} /var/log/exim/main.log &gt; /var/log/exim/spam_reporter.pl.log&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 29 Sep 2007 08:50:51 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4590</guid>
      <author>Wallace (Wallace)</author>
    </item>
    <item>
      <title>Get a list of big files on an Ensim shared hosting server</title>
      <link>http://snippets.dzone.com/posts/show/481</link>
      <description>Go to /home/virtual and run:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;find -type l -maxdepth 1 -name '*.*' | xargs -n 1 basename | xargs -i find /home/virtual/{}/var/www -type f -size +8192k -ls&lt;/code&gt;</description>
      <pubDate>Sun, 17 Jul 2005 11:04:39 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/481</guid>
      <author>peter (Peter Cooperx)</author>
    </item>
    <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>
