You are preparing to retire a Linux server that stores regulated customer information. The decommissioning checklist requires that the database export file named client.db be overwritten exactly five times with random data, followed by a final overwrite with zeros so that the shredding activity is not obvious, and then deleted from the filesystem once the overwriting completes. Which command meets all of these requirements while working from the directory that contains the file?
The command shred -u -n 5 -z client.db satisfies every stated requirement:
-n 5 performs five random overwrite passes (the default is three).
-z appends one extra pass that writes all zeros, masking evidence that the file was shredded. This pass does not alter the five random iterations-it is added on top of them.
-u (or --remove) truncates and unlinks the file after the overwriting passes, ensuring the directory entry is removed.
The other choices each miss at least one requirement:
shred -n 5 -z client.db omits -u, so the file is left in place.
shred -u -n 5 client.db omits -z, so no zero-filled final pass is performed.
shred -u -n 6 -z client.db runs six random passes, violating the instruction to overwrite exactly five times.
Therefore, only the first command complies fully with the policy.
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.
What does the `shred` command do in Linux?
Open an interactive chat with Bash
Why is overwriting with zeros using `-z` in `shred` important?
Open an interactive chat with Bash
What is the purpose of the `-u` option in the `shred` command?
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