Which of the following commands should be used to accomplish this task?

A Linux administrator needs to create an image named sda.img from the sda disk and store it in the /tmp directory.

Which of the following commands should be used to accomplish this task?
A . dd of=/dev/sda if=/tmp/sda.img
B . dd if=/dev/sda of=/tmp/sda.img
C . dd –if=/dev/sda –of=/tmp/sda.img
D . dd –of=/dev/sda –if=/tmp/sda.img

Answer: B

Explanation:

The command dd if=/dev/sda of=/tmp/sda.img should be used to create an image named sda.img from the sda disk and store it in the /tmp directory. The dd command is a tool for copying and converting data on Linux systems. The if option specifies the input file or device, in this case /dev/sda, which is the disk device.

The of option specifies the output file or device, in this case /tmp/sda.img, which is the image file. The command dd if=/dev/sda of=/tmp/sda.img will copy the entire disk data from /dev/sda to /tmp/sda.img and create an image file. This is the correct command to use to accomplish the task. The other options are incorrect because they either use the wrong options (–if or –of instead of if or of) or swap the input and output (dd of=/dev/sda if=/tmp/sda.img or dd –of=/dev/sda –if=/tmp/sda.img).

References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, page 323.

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments