GSEC · Question #243
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux- based network. He is working as a root user on the Linux operating system. He wants to delete his…
The correct answer is C. shred -vfuz private.txt. The 'shred' command securely overwrites a file to make recovery difficult, and the '-z' flag specifically adds a final overwrite pass with zeros to conceal that shredding occurred. Combining all required flags gives 'shred -vfuz'.
Question
John works as a Network Administrator for Perfect Solutions Inc. The company has a Linux- based network. He is working as a root user on the Linux operating system. He wants to delete his private.txt file from his operating system. He knows that the deleted file can be recovered easily. Hence, he wants to delete the file securely. He wants to hide the shredding, and so he desires to add a final overwrite of the file private.txt with zero. Which of the following commands will John use to accomplish his task?
Options
- Armdir -v private.txt
- Bshred -vfu private.txt
- Cshred -vfuz private.txt
- Drm -vf private.txt
How the community answered
(23 responses)- A9% (2)
- B4% (1)
- C83% (19)
- D4% (1)
Why each option
The 'shred' command securely overwrites a file to make recovery difficult, and the '-z' flag specifically adds a final overwrite pass with zeros to conceal that shredding occurred. Combining all required flags gives 'shred -vfuz'.
'rmdir' is used to remove empty directories, not files, and it performs no secure overwriting of data before deletion.
'shred -vfu private.txt' is missing the '-z' flag, so the file would be securely overwritten and removed but the shredding would not be hidden with a final zero-pass as required.
The 'shred -vfuz private.txt' command uses four flags together: '-v' for verbose output, '-f' to force overwriting by changing file permissions if needed, '-u' to remove (unlink) the file after overwriting, and '-z' to add a final zero-byte overwrite pass that hides the fact that shredding was performed. This combination satisfies all requirements: secure deletion, file removal, and concealment of the shredding process.
'rm -vf private.txt' simply removes the file from the directory index without overwriting its data, making recovery straightforward with standard forensic tools.
Concept tested: shred command flags for secure file deletion
Source: https://man7.org/linux/man-pages/man1/shred.1.html
Topics
Community Discussion
No community discussion yet for this question.