[X-Unix] Any Command-Line Tools for Secure Delete or File Wipe ???

Stroller macmonster at myrealbox.com
Wed May 2 14:51:05 PDT 2007


On 2 May 2007, at 19:11, Alexandre Gauthier wrote:
>>> ...
>>> Is there any way to effect a secure delete or file wipe --  
>>> zeroing out the original data -- from the command line?
>> Check out
>>
>> srm
>
>  that secure delete utilities re-writing slack space and  
> overwriting the files to oblivion where rendered useless on  
> Journaling file systems such as HFS+, ReiserFS and ext3?

My understanding was that data on ReiserFS can't be shredded because  
a file doesn't remain in the same place when it's rewritten. IE: if  
you  `touch foo bar && cp bar foo` then the contents of bar are  
written into a new file during the copying process - the reference to  
the original foo is then removed & the filename foo linked to the new  
(copy of bar) file.

Likewise, if you edit foo & resave it (on a ReiserFS FS) the original  
data contents may be left somewhere in the disk's "empty space" (once  
the reference to it has been removed from the file allocation table  
or whatever), which is hence why `shred` doesn't work on ReiserFS. My  
understanding is that this is a side-effect of ReiserFS' clever "B- 
tree" storage algorithm.

My understanding is that `shred` _does_ work on ext3 because ext3  
writes in place, but I have to admit I have never considered the  
implications of the journal in this regard. Wouldn't the journal  
simply reflect the zeros (or whatever) written over the file, upon  
completion of  the write?

Stroller.



More information about the X-Unix mailing list