LPIC-2 Exam 201 (Linux Engineer) — Question 10

Which of the following commands erases the contents of the /dev/sdb3 partition?

Answer options

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.