CompTIA Linux+ (XK0-006) — Question 2

A Linux systems administrator needs to extract the contents of a file named /home/dev/web.bkp to the /var/www/html/ directory. Which of the following commands should the administrator use?

Answer options

Correct answer: B

Explanation

The correct answer is B because it uses the cpio command to extract the contents of the web.bkp file into the specified directory. Option A is incorrect as it is using gzip and tar inappropriately for extraction. Option C is incorrect because it attempts to create a new archive instead of extracting. Option D is wrong since it uses unzip, which is not suitable for handling tar or cpio archives.