CompTIA Linux+ (XK0-004) — Question 238
An administrator receives a USB drive and wants to make an exact copy of the disk before starting to work on it. One of the partitions on the USB drive was mounted as /dev/sdc1.
Which of the following commands should the administrator use?
Answer options
- A. dd if=/dev/sdc of=~/usb_copy.img bs=512
- B. dd if=/dev/sdc1 of=~/usb_copy.img count=1024
- C. dd if=/dev/sdc1 of=~/usb_copy.img bs=1024
- D. dd of=/dev/sdc if=~/usb_copy.img bs=1M
Correct answer: A
Explanation
The correct command is A because it uses 'dd' to copy the entire USB drive (/dev/sdc) to an image file, which is necessary for creating an exact copy. Option B and C only copy a single partition (/dev/sdc1), which does not provide a full backup of the USB drive. Option D reverses the input and output, which would result in data loss instead of creating a copy.