[sclug] Clearing out file system dead space, was: I have an idea

Ed Davies sclug at edavies.nildram.co.uk
Sun Apr 26 11:14:49 UTC 2009


Neil Haughton wrote:
> I was reading the other day about various tools to properly delete files
> from a system (ie not just mark as deleted, but genuinely obliterate all
> traces from the storage device).
> ...

On a related note: is there any mechanism to clear out
all of the "dead" space in a file system (ext3 or any
others) without, of course, deleting the files which
are still properly linked?  That is: unused blocks,
tail ends of directories, tail ends of files and
whatever (journal entries?).

E.g., after working on a project under NDA or otherwise
handling confidential information (keys, data covered
by the data protection act, etc) you don't want to leave
any blocks from all the various edits and such on a
laptop which you're going to carry around.

The "easy" way to do it, I suppose, is just to copy the
lot to another partition then write random stuff over
the original, reformat and copy back, but maybe there's
a better way.  Worth doing similar to the swap partition,
too, if you're being really careful.

Ed.




More information about the Sclug mailing list