TestOut Linux Pro Practice Test 2025 - Free Linux Pro Practice Questions and Study Guide

Question: 1 / 400

How do you display the contents of a compressed file (e.g., .zip) in Linux?

extract [filename]

unzip [filename]

The option to use is effective because the `unzip` command is specifically designed for handling .zip files in Linux. When you want to view the contents of a compressed .zip file without extracting it to disk, you can utilize the `unzip` command with the `-l` option, as in `unzip -l [filename]`, which will list the contents of the zip file, including the names of the files stored within it and their sizes.

The other methods are not suited for displaying the contents of a .zip file directly. For instance, using a command intended for extraction, such as `extract`, doesn't provide an option to simply list the files without expanding the archive. Similarly, `open` and `view` are not standard commands in Linux for handling zip files and will not yield the desired results when trying to display the contents of a compressed file. Therefore, the `unzip` command stands out as the correct choice for this task.

Get further explanation with Examzify DeepDiveBeta

open [filename]

view [filename]

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy