XK0-006 practice question 3 of 15
A Linux administrator needs to securely erase the contents of a hard disk. Which of the following commands is the best for this task?
Full set: 149 questionsThe shred command is specifically designed to securely erase data from a file or device, making it extremely difficult to recover. It works by overwriting the specified target (in this case, the partition /dev/sda1) multiple times with complex patterns and, by default, a final pass of zeros. This process effectively destroys the magnetic remnants of the original data on traditional hard disk drives. For securely erasing a disk or partition, shred is the most appropriate and effective tool among the choices provided.
A. rm -rf only removes the filesystem's pointers to the data. The actual data remains on the disk and is easily recoverable until it is overwritten by new data.
C. parted rm removes a partition entry from the disk's partition table. It does not overwrite or erase the data that was stored within that partition.
D. dd if=/dev/null attempts to copy from /dev/null, which is an empty file, resulting in zero bytes being written. dd if=/dev/zero would perform a single-pass overwrite, which is less secure than shred.
1. GNU Project. (2020). GNU Coreutils Manual. Section 14.3 "shred: Remove files more securely". https://www.gnu.org/software/coreutils/manual/htmlnode/shred-invocation.html
2. The Linux man-pages project. (2021). shred(1) — overwrite a file to hide its contents, and optionally delete it. https://man7.org/linux/man-pages/man1/shred.1.html
3. Gutmann, P. (1996). Secure Deletion of Data from Magnetic and Solid-State Memory. Proceedings of the Sixth USENIX Security Symposium. (This paper provides the theoretical basis for the algorithms used by tools like shred). https://www.usenix.org/legacy/publications/library/proceedings/sec96/fullpapers/gutmann/
Keep practicing
Take the free XK0-006 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other XK0-006 practice questions
- Question 1A DevOps engineer needs to create a local Git repository. Which of the following commands…
- Question 2Which of the following is the main reason for setting up password expiry policies?
- Question 4Which of the following best describes the role of initrd?
- Question 5Which of the following is a characteristic of Python 3?
- Question 6A Linux user runs the following command: nohup ping comptia.com & Which of the following …
- Question 7A systems administrator needs to enable routing of IP packets between network interfaces.…
