in reply to Does this script securely delete data?

Deleting a file so that it can not be evaluated for it's original content is such a broad topic that there is no way to certify that a file is obscured to an unreadable state.

Let's put it this way, depending on the resources of the evaluator, it is theoretically possible to read file data at a near atomic level to determine the original content.

At the file system level, one assumes that writes follow the inode path of the file stored. This is likely, but not guaranteed in every situation. If you write to files in "read/write" mode this may help stay on the original file inode path (but maybe not):

Untested:

my $fh; unless (open $fh, "+<".$file) { die "Can't open file for read/write: $file\n$!\n"; } seek $fh, 0, 0 or die "Seek failure"; # print to file code here close $fh;

In actuality, any non-operating system level attempt to obscure a file might suffer from details not controllable at the user code level.