CompTIA Linux+ (XK0-004) — Question 158

A junior systems administrator is scanning archive.tar files with an antivirus scanner. The administrator is given the following tasks:
✑ List all files that are in the archive.tar files.
✑ Extract all files from the archive.tar files.
Which of the following actions should be performed to meet these requirements? (Choose two.)

Answer options

Correct answer: A, B

Explanation

The command 'tar -tvf archive.tar' lists the contents of the archive, which fulfills the requirement to see all files. The command 'tar -xf archive.tar' extracts the files from the archive, effectively meeting the extraction requirement. The other options do not provide the required functionality for listing or extracting files.