Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Does this script securely delete data?

by snopal (Pilgrim)
on Jul 14, 2007 at 04:18 UTC ( [id://626578]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://626578]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-16 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found