Lpic 2 Linux Engineer · Free Practice Question Medium
Question 16
- 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.
