A Linux administrator is decommissioning a server and needs to securely wipe a magnetic hard drive (HDD) that previously stored sensitive financial records. The company's policy requires that the data be overwritten multiple times with varying patterns to prevent recovery using specialized hardware. The administrator wants to use a command-line utility specifically designed for this purpose. Which of the following commands is the MOST appropriate choice to meet this requirement?
The correct command is shred /dev/sda. The shred utility is specifically designed for securely erasing data on devices or in files. By default, it overwrites the target with multiple passes of pseudorandom data, making the original content extremely difficult to recover. The dd if=/dev/zero of=/dev/sda command will overwrite the disk with zeros, but only in a single pass, which may not be sufficient for highly sensitive data and doesn't meet the requirement for multiple, varied passes. The badblocks -w /dev/sda command performs a write-mode test by writing patterns to the disk, but its primary purpose is to check for physical defects on the storage medium, not for secure data sanitization. The mkfs.ext4 /dev/sda command simply creates a new, empty filesystem, which overwrites metadata but leaves most of the actual data blocks on the disk untouched and potentially recoverable.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
How does the `shred` command securely erase data?
Open an interactive chat with Bash
Why isn’t `dd if=/dev/zero of=/dev/sda` considered sufficient for secure wiping?
Open an interactive chat with Bash
What is the difference between `shred` and `badblocks -w` when wiping data?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access