Say I have a file called package.tar.gz
Then I do:
cat package.tar.gz | gzip -d | tar tvf -
and it shows me the list of files in my tar archive.
However if I do:
gzip -d package.tar.gz | tar tvf -
It says tar: This does not look like a tar archive
I don't understand why that is. If the result of gzip -d
in the first case returns output which can be interpreted as a tar archive, why won't it work in the second case?
I have seen Autotools - tar This does not look like a tar archive but I'm not convinced that it's an issue with tar in my case since the first command works...