Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given the fact shred will not be effective on ext3, I wonder what are the available alternatives right now.

$ man shred

   CAUTION: Note that shred relies on a very  important  assumption:  that
   the  file system overwrites data in place.  This is the traditional way
   to do things, but many modern file system designs do not  satisfy  this
   assumption.   The following are examples of file systems on which shred
   is not effective, or is not guaranteed to be effective in all file sys‐
   tem modes:

   * log-structured or journaled file systems, such as those supplied with
   AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)
share|improve this question
up vote 3 down vote accepted

shred is fine if you want to shred an entire partition, and most will probably be destroyed if you shred a single file, but possibly not all. If you shred the entire partition then you work below the level of the filesystem (and will have to recreate a filesystem after the fact). This will delete everything so should only be done after making a copy of all valuable data, and having reinstall disks to hand. So if you have data on /dev/sda1 you could unmount the partition, or boot from a live disk, and do

$ sudo shred /dev/sda1

I normally use srm - part of the secure-delete package - for deleting files as it can recursively delete files, unlike shred. I accept it may miss bits, but then I also encrypt my files, so the missed bits should be impossible to decrypt. (I use ecryptfs which encrypts each file with a different key, so provided the first part of the file with the key is properly overwritten, the rest of the file will be impossible to recover. ecryptfs is what is used if you select "encrypt my files" on installation).

share|improve this answer
Summarizing: Either shred on the entire partition (good enough for me) or srm on a single file if file was encrypted in first place. – Tzury Bar Yochay Oct 18 '10 at 4:21

Forget shred (which doesn't work in all cases: no matter what the filesystem is, concurrent activity can throw it off), and encrypt any sensitive file. See these questions:

share|improve this answer

As far as I can tell there are no alternatives to shred for journaled file systems. However you can turn your ext3 partition into ext2 temporarily, though it can be a pain. For more information take a look at this article.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.