TestOut Linux Pro Practice Test

Question: 1 / 400

To extract files from a tar archive, which command should be used?

tar -xzf

To extract files from a tar archive, the command that should be used combines specific options that inform the `tar` command about what you want to accomplish. The correct choice to extract files is the one that includes the `-x` option, which stands for "extract."

Additionally, the `-z` option is included to handle archives that are compressed with gzip, allowing for the extraction of gzip-compressed tar files (often with a `.tar.gz` or `.tgz` extension). The `-f` option specifies that the following argument will be the filename of the archive from which you want to extract files.

Therefore, using `tar -xzf [archive.tar.gz]` effectively instructs the system to extract the contents of the specified gzipped tar archive. This command correctly combines the necessary components to perform the extraction process in a straightforward manner.

The other options do not fulfill the requirements for extracting files from a tar archive. For instance, using `tar -cf` is intended for creating a new tar archive rather than extracting, and "extract tar" as well as "uncompress" are not valid commands for extracting files from a tar archive specifically.

Get further explanation with Examzify DeepDiveBeta

tar -cf

extract tar

uncompress

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy