Lpic 2 Linux Engineer · Free Practice Question Medium

Question 16

After creating a backup archive with tar, the administrator wants to verify its integrity. Which command should they use?
  • A tar -tvf /backup/home.tar.gz
  • B tar -tzf /backup/home.tar.gz
  • C tar -tf /backup/home.tar.gz
  • D tar -tzf /backup/home.tar.gz > /dev/null
Reveal correct answer

Correct answer: D

A. The command "tar -tvf /backup/home.tar.gz" is used to list the contents of a tar archive file. It does not perform integrity verification of the archive.

B. The command "tar -tzf /backup/home.tar.gz" is used to list the contents of a gzip-compressed tar archive file. It does not perform integrity verification of the archive.

C. The command "tar -tf /backup/home.tar.gz" is used to list the contents of a tar archive file. It does not perform integrity verification of the archive.

D. The command "tar -tzf /backup/home.tar.gz > /dev/null" is used to verify the integrity of a gzip-compressed tar archive file by listing its contents silently. The "> /dev/null" part redirects the output to /dev/null, so only errors (if any) will be displayed. This is the correct command for verifying the integrity of the backup archive.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need