How to definitely delete and without a trace your data with Linux

shred

With this data privacy period (see previous article), it is recommended, when you have private data, to delete them securely (no! move to trash is not how to delete a file, and empty the trash is not how to delete securely a file).
I give a simple but effective example on how to delete a file on Linux with shred command installed on Debian (certainly available with other Linux OS).

shred -n 7 -u -z <file name>

Yes, so simple, so why do not do that?

-n 7 : rewrite 7 times data in the file (default 3, but we are not too careful, 7 seems a good compromise)
-u : delete the file after rewriting
-z : fill 0 to hide shredding before deleting the file

This command take less than 10 minutes for a 7.4 Gb file and 7 pass, so nothing should stop you to do that without losing your day.

You can add -v option to show progress if you are curious.

Leave a Reply

Your email address will not be published. Required fields are marked *