Shred files – securely delete files, folders or partitions

To shred files or partitions securely:

$> shred -vun <loops> <File1> <File2> 
$> shred -vzn <loops> <Device>

loop is the count of the loop beginning with 0 (3 means 4-times)!!!

You can get the partition table as described in List of partitions or List, partitioning and format drives.

If you want to shred a directory recursively, you have to use find:

$> find PATH/TO/FOLDER -type f -exec shred -vun 100 {} \;

This shreds all files in PATH/TO/FOLDER 100 times.

Attention: If you’re not careful with these snippets, it can lead to unwanted data loss!

2 thoughts on “Shred files – securely delete files, folders or partitions

Leave a Reply

Your email address will not be published.

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.