LPIC-2 Exam 201 (Linux Engineer) — Question 10
Which of the following commands erases the contents of the /dev/sdb3 partition?
Answer options
- A. rm /dev/sdb3
- B. dd if=/dev/zero of=/dev/sdb3
- C. dd of=/dev/zero if=/dev/sdb3
- D. umount /dev/sdb3
Correct answer: B
Explanation
The command 'dd if=/dev/zero of=/dev/sdb3' writes zeros to the /dev/sdb3 partition, effectively erasing its contents. Option A attempts to remove the partition as a file, which is not applicable here. Option C has the input and output reversed, which would not accomplish the intended result, and Option D simply unmounts the partition, not erasing any data.