CompTIA Linux+ (XK0-004) — Question 110

A raw VM image is being compressed with bzip2 and copied to a flash drive at /dev/hdb for off-site use by the marketing department. Which of the following command lines accomplishes this task?

Answer options

Correct answer: C

Explanation

The correct option, C, uses the cp command to copy the VM image and pipes it through bzip2 to compress it while saving it to /dev/hdb. Option A incorrectly uses mv instead of cp, which will not work for this task. Option B uses dd instead of copying directly to the destination, which is not the intended method here. Option D incorrectly attempts to use cp with bzip2 in a way that does not properly handle the compression and output redirection.