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
curl -L -s -o - | tar -xf -

The error:

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

However when I do this, It can extract the archive:

curl -LO
tar xf transmission-2.80.tar.xz

Why did the pipe not work?

share|improve this question
up vote 3 down vote accepted

I think you need tar's -J option in your pipe. e.g. | tar -xJf -

The -J option tells tar to use xz compression.

I think that the reason why tar xf transmission-2.80.tar.xz works without -J is that the option is inferred by tar based on the file extension.

share|improve this answer

The pipe did not work because a binary stream does not end with a recognized file extension. The binary stream in this particular case was compressed with LZMA. A tar archive is not the same as some LZMA compressed data. This is exactly what tar told you.

If you let it know what kind of compression (options J, j, z) a tar archive was created with, it will decompress first using that algorithm and recognize the decompressed data stream as a tar archive.

share|improve this answer
Yhank you for the thorough explanation sir. – Michelle Jul 19 '13 at 8:09

You must log in to answer this question.

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