Secure delete with python

Paul Rubin http
Mon Sep 6 18:24:26 EDT 2004


Ville Vainio <ville at spammers.com> writes:
>     Benjamin> and there is no guarantee that this actually overwrites
>     Benjamin> the old file. The filesystem may choose to write the new
>     Benjamin> content at another location of the disk, leaving the
>     Benjamin> original data untouched.
> 
> Seriously? What OSen are known for doing this? I'd had thought that if
> the file size is unchanged, the data is always written over the old
> data...

That's what log structured file systems do, for example.

> Also, when overwriting a file, it's better to do it several times,
> with alternating bit patterns and "syncing" the disk after each
> pass. Of course even that is not going to guarantee anything because
> it may just go to the hardware cache in the disk unit, but it's
> reasonable if you are overwriting lots of data at once.

It may never get written to the same sector of the disk as the
original file, even if the OS has tried to overwrite those sectors.
Disk drives themselves will sometimes remap sectors from one place to
another.



More information about the Python-list mailing list