exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 65 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 65
Topic #: 1
[All LFCS Questions]

Which of the following commands displays 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
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
rona962
2 months, 4 weeks ago
Selected Answer: B
The correct command to display the contents of a gzip compressed tar archive in Linux is: B. tar ztf archive.tgz Explanation: The option "z" is used to filter the archive through gzip. The option "t" is used to list the contents of the archive. The option "f" is used to specify the archive file name. Option A would extract the contents of the archive and print the output on the screen, which is not the same as listing the contents of the archive. Option C would extract and display the contents of the archive, but the "-d" option in gzip would decompress the archive, which is not what is requested. Option D creates a new tar archive and does not display the contents of an existing archive.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago