in reply to Re: overwrite a file
in thread overwrite a file

The approach is simple and granular. However I would agree with ikegami that system cache may work against you. In *nx systems you might consider to call sync after each file close call to have the system clean out its disk cache.

For the really paranoid among us other things that may influence success are i.e. disk controller internal caches, cache issues with remote filesystems mounted over network, parallel read/writes on the file by another process. Besides those caching aspects you need to consider filesystem type, as your data may still live in the journal logs.

Bottomline: Solid erasure of data on a granular level like files is always tricky.

Replies are listed 'Best First'.
Re^3: overwrite a file
by andreas1234567 (Vicar) on Jun 18, 2007 at 08:58 UTC
    Bottomline: Solid erasure of data on a granular level like files is always tricky.
    Agreed. However, secure shredding on disk level is less tricky, albeit cumbersome, as seen here.
    --
    print map{chr}unpack(q{A3}x24,q{074117115116032097110111116104101114032080101114108032104097099107101114})