<?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 Re: File Latest and Oldest in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552624#M156879</link>
    <description>&lt;P&gt;each upload was on different day, say for example.. 1st upload 2020, 2nd upload 1 month ago and 3rd today.Any help?&lt;/P&gt;</description>
    <pubDate>Sun, 23 May 2021 05:49:40 GMT</pubDate>
    <dc:creator>akankshayadav</dc:creator>
    <dc:date>2021-05-23T05:49:40Z</dc:date>
    <item>
      <title>File Latest and Oldest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552620#M156875</link>
      <description>&lt;P&gt;I have a file which I uploaded once (say 1 year ago), i uploaded it again (say 6 months ago) with some changes, and then I uploaded the same file again recently with some changes . But I want to display only the latest file and the latest-1 version of the file. i.e... if I upload a file for n- time, i only want to compare the nth and (n-1)th files, and grab the event(s) which if different in them. Can any one help?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 04:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552620#M156875</guid>
      <dc:creator>akankshayadav</dc:creator>
      <dc:date>2021-05-23T04:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: File Latest and Oldest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552623#M156878</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234662"&gt;@akankshayadav&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if each upload was done in the same day, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index [ | metasearch 
     index=your_index earliest=0
     | bin span=1d _time
     | dedup _time
     | sort -_time
     | head 2
     | stats earliest(_time) AS earliest latest(_time) AS latest
     | eval latest=latest+86400
     | fields earliest latest
     ]
| ...&lt;/LI-CODE&gt;&lt;P&gt;In this way you'll have only events of the last two uploads.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 05:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552623#M156878</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-05-23T05:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: File Latest and Oldest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552624#M156879</link>
      <description>&lt;P&gt;each upload was on different day, say for example.. 1st upload 2020, 2nd upload 1 month ago and 3rd today.Any help?&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 05:49:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552624#M156879</guid>
      <dc:creator>akankshayadav</dc:creator>
      <dc:date>2021-05-23T05:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: File Latest and Oldest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552683#M156888</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234662"&gt;@akankshayadav&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in this case, my solution should run, please try it.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 05:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/File-Latest-and-Oldest/m-p/552683#M156888</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-05-24T05:37:07Z</dc:date>
    </item>
  </channel>
</rss>

