
If you’re storing any confidential information on your server (or you’re just paranoid) you may need to securely delete it at some point. Let’s face it, you don’t want those plans for converting lead into gold to get into the wrong hands. Don’t fret though, your alchemy plans will be non-recoverable after running the shred tool.
This tool allows you to overwrite a file with random data (ones and zeros) a configurable number of times. This command line tool has the following syntax:
shred [OPTIONS] filename
The most common options you’ll use are as follows:
-n – The number of times you want to overwrite the file with random data. The United States Government defines 7 as the standard.
-u – Remove the file after overwriting (otherwise the file will still exists, just full of random data instead).
-z – Overwrite the data once more, this time just with zeros. This tries to make it less obvious that a file was overwritten.
-v – Verbose output (show progress).
-f – Forces permissions to allow writing. Likely not necessary in most scenarios.
For example, if you wanted to remove alchemy.pdf, you would use the following command (7 passes):
shred -n 7 -u -z -v alchemy.pdf
Which would output the following:
shred: alchemy.pdf: pass 1/8 (random)...
shred: alchemy.pdf: pass 2/8 (555555)...
shred: alchemy.pdf: pass 3/8 (aaaaaa)...
shred: alchemy.pdf: pass 4/8 (random)...
shred: alchemy.pdf: pass 5/8 (ffffff)...
shred: alchemy.pdf: pass 6/8 (000000)...
shred: alchemy.pdf: pass 7/8 (random)...
shred: alchemy.pdf: pass 8/8 (000000)...
shred: alchemy.pdf: removing
shred: alchemy.pdf: renamed to 00000000000
shred: 00000000000: renamed to 0000000000
shred: 0000000000: renamed to 000000000
shred: 000000000: renamed to 00000000
shred: 00000000: renamed to 0000000
shred: 0000000: renamed to 000000
shred: 000000: renamed to 00000
shred: 00000: renamed to 0000
shred: 0000: renamed to 000
shred: 000: renamed to 00
shred: 00: renamed to 0
shred: alchemy.pdf: removed
Now you can be rest assured that nobody will know why you buy so much lead.




