gzip - Input output redirection UNIX -


say have file called package.tar.gz do: cat package.tar.gz | gzip -d | tar tvf - , shows me list of files in tar archive.

however if do: gzip -d package.tar.gz | tar tvf - says tar: not tar archive

i don't understand why is. if result of gzip -d in first case returns output can interpreted tar archive, why won't work in second case?

i have seen autotools - tar not tar archive i'm not convinced it's issue tar in case since first command works...

it looks me you're not passing -d option in second case. manpage,

compressed files can restored original form using gzip -d or gunzip or zcat.

what's appropriate style zcat sounds - gunzip + cat.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -