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
...
Log in to ExamTopics
Sign in:
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.
rona962
2 months, 4 weeks ago