Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created tar.gz from my linux server, and I downloaded the same to my linux system and I successfully doen untar with tar -xvf package.tar.gz.

And now my issue

I downloaded same package.tar.gz to the windows system then uploaded to another linux server, and tried same command tar -xvf package.tar.gz. but it getting

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

as response. I also tried filezill manual trnasfer with binary mode.

How can I do the same ?


When I directly download to the linux system its working fine.

When I downloaded to the windows system and try to extract with 7zip or winrar error is getting

When I download to windows and upload to linux same error getting

share|improve this question
Some tar versions (or even just builds) need the z flag explicitly. Did you try tar -xzvf package.tar.gz ? – Bandrami Jun 11 '14 at 4:03
Yeah, I tried that too :( – Miqdad Ali Jun 11 '14 at 4:05
It's possible the file got corrupted somewhere along the way. You could test that using md5sum on the linux boxes. On windows use to check. the md5sum of the file should be the same in all locations. if it isn't there is a problem with the file. – Jason Lewis Jun 11 '14 at 4:12
are both linux boxes with the same os version/same version of tar? maybe one is gnutar and the other is bsdtar. what do you get from 'which -a tar' and what from 'tar --version' on borh linux machines? – konqui Jun 11 '14 at 5:02
@konqui yeah, If I directly download to the that linux system it will work :( – Miqdad Ali Jun 11 '14 at 5:17

You can break it down to unzip first then untar

gunzip package.tar.gz
tar xfv package.tar

or do it in one command

gunzip -c package.tar.gz | tar xfv -

It maybe on the other Linux system the tar does not recogize gz files or needs the z flag.

share|improve this answer

You can gunzip and untar in one step without using pipe:

tar xvfz package.tar.gz

or depending on the tar version you have, you may need a dash -

tar -xvfz package.tar.gz

which is equivalent to

gunzip -c package.tar.gz | tar xfv -
share|improve this answer

I don't have 50 rep yet so I cannot add comments, only reply.

Do what Jason Lewis mentioned. Get the md5 hash of the files and see if they get corrupted along the way somewhere.

On linux, use md5sum command

On windows, download Microsoft's FCIV tool and use that.

Then you can see if the file gets corrupted while transferring to windows, or if it is pristine to windows but then getting corrupted while then transferring to linux. This will narrow your debugging A LOT

FCIV is here:

Windows example fciv

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .