QuestionQ140

Essential Commands

Which of the following commands lists 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

The tar command uses z to process gzip compression and t to list archive members, so tar ztf archive.tgz displays the archive’s contents without extracting them.

Community Discussion

No comments yet. Be the first to start the discussion!