Secure delete with python
Roel Schroeven
rschroev_nospam_ml at fastmail.fm
Mon Sep 6 16:40:50 EDT 2004
Ville Vainio wrote:
>>>>>>"Benjamin" == Benjamin Niemann <b.niemann at betternet.de> writes:
>
>
> >> fp = open(path, "wb")
> >> for i in range(os.path.getsize(path)):
> >> fp.write("*")
> >> fp.close()
> >> os.unlink(path)
>
> 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...
VMS, I believe, has a versioning system built into the file system. Each
time a file is saved, a new version is created while the old versions
are still there. All from hearsay though, I have never used or seen VMS
myself.
--
"Codito ergo sum"
Roel Schroeven
More information about the Python-list
mailing list