linux poison RSS
linux poison Email

shred - Securely delete files in Linux

In case you want to delete some confidential data from your computer just to make sure that it is no longer accessible to anyone, then do not delete the file using the regular rm command because there will still remain a chance that someone might use a software to recover your deleted data before the specific storage area is overwritten by new data. The proper way to permanently dispose of such data in Linux is the shred command.

* NOTE *
In  the case of ext3/ext4 file systems, in  both  the  data=ordered (default) and data=writeback modes, shred works as usual.Ext3/Ext4 journaling modes can be changed by adding the data=something option to the mount options for a particular file system in the /etc/fstab file.

Most Linux distribution come with shred already installed. If not, they are one click away in the repositories. shred is already included, in the multipurpose package called coreutils, which includes tens of utilities.

Using shred:
shred is a command utility. It can be run against files or folders, with certain flags.
# shred -f -u -v -z filename
-f change permissions to allow writing if necessary
-u truncate and remove file after overwriting
-v be verbose (detailed) and show progress
-z add a final overwrite with zeros to hide shredding

shred might not work on bad sectors, it is one of the best tools available to securely erase data from your hard disk. It is always more secure to run shred on a complete partition rather than a file, because some filesystems keep backup files and shred makes no attempt to delete these.
# shred /dev/hda2


Post a Comment

Related Posts with Thumbnails