Friday, 12 February 2010

shred: Delete a file securely, first overwriting it to hide its contents.

It is available on most of Linux distributions including Debian GNU/Linux. To remove file called personalinfo.tar.gz :

$ shred -n 200 -z -u personalinfo.tar.gz

Where,

* -n: Overwrite N (200) times instead of the default (25) * -z: Add a final overwrite with zeros to hide shreddin * -u: Truncate and remove file after overwriting

Read the man page of shred(1) for more information. Most of these utilities are not effective (read as useless) only if :

* File system is log-structured or journaled filesystems, such as JFS, ReiserFS, XFS, Ext3 etc * Your filesystems is RAID-based, compressed filesystem etc * In addition, file system backups and remote mirrors may contain copies of the file that cannot be removed by these utilities.

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

Disclaimer:

This blog consists mostly of personal fixes, custom scripts and back-up configs. I keep them here for my own reference, as I have a memory like a sieve.

Some of the fixes may be out of date, but they all worked at one time. If you want to try them, feel free. Make sure you check your distro version first, and how old the fixes are. Some of them go back a long way and will be useless now.

A majority of the stuff is only of use to me, but maybe you'll find something useful. Good luck!