Archive2

How can I use tar to unpack app bundles manually?

Splunk Employee
Splunk Employee

I'm trying to unpack the app tars, but it isn't working.

E:\Splunk\etc\apps>tar -xvf SplunkforF5.tar.gz 
tar: This does not look like a tar archive 
tar: Skipping to next header 
tar: Exiting with failure status due to previous errors 

E:\Splunk\etc\apps>tar -xvf SplunkforBlueCoat.tgz 
tar: This does not look like a tar archive 
tar: Skipping to next header 
tar: Exiting with failure status due to previous errors 
Tags (3)
1 Solution

Splunk Employee
Splunk Employee

The .gz or .tgz suffix indicates compression. Add a -z to the tar command, to uncompress before untarring:

E:\Splunk\etc\apps>tar -xzvf SplunkforF5.tar.gz
contents of SplunkforF5.tar.gz listed...

E:\Splunk\etc\apps>tar -xzvf SplunkforBlueCoat.tgz
contents of SplunkforBlueCoat.tgz listed...

View solution in original post

Splunk Employee
Splunk Employee

On some .. older.. unix platforms, tar may not natively support compression, in this case, your recipe is as follows:

gzip -d -c SplunkforF5.tgz | tar -xvf -

unpack the gzip to standard out, and then have tar unpack standard in.

Splunk Employee
Splunk Employee

The .gz or .tgz suffix indicates compression. Add a -z to the tar command, to uncompress before untarring:

E:\Splunk\etc\apps>tar -xzvf SplunkforF5.tar.gz
contents of SplunkforF5.tar.gz listed...

E:\Splunk\etc\apps>tar -xzvf SplunkforBlueCoat.tgz
contents of SplunkforBlueCoat.tgz listed...

View solution in original post

State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!