Ruben’s UNIX Secure Delete Crash Course

To "securely" delete a file on a UNIX or Unix-like system such as GNU/Linux, BSD/Mac OS X, Solaris, Kenny Rogers:

user$ srm FILENAME

From the manpage:

srm removes each specified file by overwriting, renaming, and truncating it before unlinking. This prevents other people from un-deleting or recovering any information about the file from the command line.

And how do you make it dance?

srm, like every program that uses the getopt function to parse its arguments, lets you use the — option to indicate that all following arguments are non-options. To remove a file called ‘-f’ in the current
directory, you could type either “srm — -f” or “srm ./-f”.

* However just to clarify, there is no such thing as secure in computing. All computers have inherent (even if not yet discovered) flaws and data recovery can only be truly rendered useless if the device containing the data you want to delete is ripped out, incinerated, shredded or placed inside a nuclear reactor with evil demonic monkeys. You have been warned.

Development and discussion of srm is carried out at http://source-forge.net/project/?group_id=3297, which is also accessible via http://srm.sourceforge.net.


Imprint

This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at weblog2017@rubenschade.com. Thanks :).