data shredder

Amedee Van Gasse (ub) amedee-ubuntu at amedee.be
Mon Dec 21 08:55:42 UTC 2009


On Mon, December 21, 2009 04:28, jesse stephen wrote:
> I'm looking for a data shredder for ubuntu 9.10

The other suggestions are good, and if you want a low-tech solution:

1) delete your files with rm as usual
2) overwrite the empty disk space with zeroes or random data
Use either one of these commands:

dd if=/dev/null of=nullfile bs=1M
dd if=/dev/random of=randomfile bs=1M

They will create a file called 'nullfile' or 'randomfile', filling all the
empty space on your disk. The dd command will automatically abort when all
free disk space is used.
Please note that this can take a *long* time, depending on the size of
your free disk space. Also /dev/random is a special device that generates
"entropy" (=random data) and with this method you use up all the available
entropy so sometimes it will stall until it has created enough new
entropy.

When it's done, rm nullfile or em randomfile.
If you're really paranoid, repeat the procedure a couple of times.



I use this method with /dev/null for another purpose: to backup usb
sticks. I have some preconfigured images (data recovery, ubuntu
installation,...) and I fill the stick with zeroes before doing a
full-disk backup with dd. This compresses the images very efficiently.
If you understand dutch, you can read about it on
http://amedee.be/kleine-full-disk-backup-dd
This is the short version:

$ dd if=/dev/zero of=/media/USB_2G/delete bs=1M
$ rm /media/USB_2G/delete
$ sudo umount /dev/sde1
$ dd if=/dev/sde | gzip -c9 > USB_2G_ext2.gz

Restore the backup with
$ gunzip -c USB_2G_ext2.gz | dd of=/dev/sde

Have fun!

-- 
Amedee





More information about the ubuntu-users mailing list