Skip to main content
Linux AdministrationMediumSingle Choice

Linux Administration Question

Statement

Which of the following commands displays the contents of a gzip compressed tar archive?

#tar#gzip#ztf#tvf#archive.tgz
A

gzip archive.tgz | tar xvf -

B

tar ztf archive.tgz

Correct
C

gzip -d archive.tgz | tar tvf -

D

tar cf archive.tgz

Resolution & Explanations

The tar command uses z for gzip compression, t to list contents (table of contents), and f to specify the file.