<?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: Check if a particular file exists inside a tar file in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580074#M11051</link>
    <description>&lt;P&gt;Yes, as said on previous reply, there is no "direct" splunk command to do this task.&lt;/P&gt;&lt;P&gt;you have to write a custom command..&lt;/P&gt;&lt;P&gt;Better idea, as i did in my previous project, for downloading weekly&amp;nbsp;GeoLite files,&amp;nbsp;i ran a shell script which does these tasks inside(tar command got the options:&lt;/P&gt;&lt;P&gt;/bin/tar -zxvf /opt/splunk/fullpath/GeoLite2-City-Latest.tgz -C /opt/splunk/etc/apps/somepath/local/ --strip-components=1 GeoLite2-City_*/GeoLite2-City.mmdb&lt;/P&gt;&lt;P&gt;) and the script output can be fed to splunk. the shell script can be run by cronjob on required intervals..&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jan 2022 02:02:50 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2022-01-06T02:02:50Z</dc:date>
    <item>
      <title>Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580057#M11049</link>
      <description>&lt;P&gt;I have field with filename&amp;nbsp; containing .tgz file. I need to check if a particular file example XYZ exists inside this .tgz file.&lt;BR /&gt;&amp;nbsp;How can I do this?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 22:17:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580057#M11049</guid>
      <dc:creator>BasicLearner</dc:creator>
      <dc:date>2022-01-05T22:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580070#M11050</link>
      <description>&lt;P&gt;Write a custom command that does the equivalent of&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tar -ztf $1 | grep $2&lt;/LI-CODE&gt;&lt;P&gt;This assumes the tarball is on the local search head.&lt;/P&gt;&lt;P&gt;IOW, Splunk does not have this functionality built-in.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 01:18:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580070#M11050</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-06T01:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580074#M11051</link>
      <description>&lt;P&gt;Yes, as said on previous reply, there is no "direct" splunk command to do this task.&lt;/P&gt;&lt;P&gt;you have to write a custom command..&lt;/P&gt;&lt;P&gt;Better idea, as i did in my previous project, for downloading weekly&amp;nbsp;GeoLite files,&amp;nbsp;i ran a shell script which does these tasks inside(tar command got the options:&lt;/P&gt;&lt;P&gt;/bin/tar -zxvf /opt/splunk/fullpath/GeoLite2-City-Latest.tgz -C /opt/splunk/etc/apps/somepath/local/ --strip-components=1 GeoLite2-City_*/GeoLite2-City.mmdb&lt;/P&gt;&lt;P&gt;) and the script output can be fed to splunk. the shell script can be run by cronjob on required intervals..&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 02:02:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580074#M11051</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2022-01-06T02:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580103#M11059</link>
      <description>&lt;P&gt;Hi inventsekar,&lt;/P&gt;&lt;P&gt;Thank you for your inputs. Need to try the shell script option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 09:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580103#M11059</guid>
      <dc:creator>BasicLearner</dc:creator>
      <dc:date>2022-01-06T09:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580104#M11060</link>
      <description>&lt;P&gt;Hi Richgalloway,&lt;/P&gt;&lt;P&gt;Thank you for the information. Need to try more of these options. I am still new to splunk.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 10:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580104#M11060</guid>
      <dc:creator>BasicLearner</dc:creator>
      <dc:date>2022-01-06T10:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580127#M11065</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240267"&gt;@BasicLearner&lt;/a&gt;&amp;nbsp;,.. as you "almost" got your answer, maybe you could "accept as solution" the previous reply, so that this post will become an answered post and i will get my 2 cents as well &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 13:55:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580127#M11065</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2022-01-06T13:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a particular file exists inside a tar file</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580414#M11082</link>
      <description>&lt;P&gt;Sorry this did not help me find the solution.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 09:45:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Check-if-a-particular-file-exists-inside-a-tar-file/m-p/580414#M11082</guid>
      <dc:creator>BasicLearner</dc:creator>
      <dc:date>2022-01-10T09:45:39Z</dc:date>
    </item>
  </channel>
</rss>

