Which command will show you the contents of a gzip compressed tar archive?

Which command will show you the contents of a gzip compressed tar archive?

Which command will show you the contents of a gzip compressed tar archive?

A.
gzip archive.tgz | tar xvf –

B.
tar ztf archive.tgz

C.
gzip -d archive.tgz | tar tvf –

D.
tar cf archive.tgz

Explanation:
A) gzip would inplace compress ; using pipe would not make sense
C) gzip -d would inplace uncompress .gz; pipe also would not make sense here
D) tar cf would create an archive, not list the contents.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Francisco Ricardo Voces

Francisco Ricardo Voces

Para ampliar datos: gzip -dc archive.tgz | tar tvf –
Si se incluye -c, la salida es correcta