<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Finding and removing all but one duplicate doc in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Finding-and-removing-all-but-one-duplicate-doc/m-p/142392#M29116</link>
    <description>&lt;P&gt;All,&lt;/P&gt;

&lt;P&gt;I'm curious, is there an easy way to find all duplicate logs and delete all but one of them?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2014 19:39:55 GMT</pubDate>
    <dc:creator>bruceclarke</dc:creator>
    <dc:date>2014-02-07T19:39:55Z</dc:date>
    <item>
      <title>Finding and removing all but one duplicate doc</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Finding-and-removing-all-but-one-duplicate-doc/m-p/142392#M29116</link>
      <description>&lt;P&gt;All,&lt;/P&gt;

&lt;P&gt;I'm curious, is there an easy way to find all duplicate logs and delete all but one of them?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 19:39:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Finding-and-removing-all-but-one-duplicate-doc/m-p/142392#M29116</guid>
      <dc:creator>bruceclarke</dc:creator>
      <dc:date>2014-02-07T19:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Finding and removing all but one duplicate doc</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Finding-and-removing-all-but-one-duplicate-doc/m-p/142393#M29117</link>
      <description>&lt;P&gt;You could do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | streamstats count by _raw | where count &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should select duplicates number 2, 3, and so on. Once you've confirmed that this really is what you're looking for, you can switch to a user with the can_delete role and pipe that to &lt;CODE&gt;delete&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2014 20:05:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Finding-and-removing-all-but-one-duplicate-doc/m-p/142393#M29117</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-07T20:05:31Z</dc:date>
    </item>
  </channel>
</rss>

