curl -L http://download.transmissionbt.com/files/transmission-2.80.tar.xz -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 http://download.transmissionbt.com/files/transmission-2.80.tar.xz
tar xf transmission-2.80.tar.xz

Why did the pipe not work?


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.


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.

  • Yhank you for the thorough explanation sir. – Jürgen Paul Jul 19 '13 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.