Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a File Go Away Forever

Status
Not open for further replies.

C4C

Technical User
Jan 1, 2003
11
0
0
US
Hello,

In another forum there was a discussion about the IRS losing the e-mail messages. A person inquired about how to permanently delete a file. I was once told by a law enforcement agent that overwriting a file would prevent it from being recovered. I now know that is not correct and yet it is correct. One of those people that every forum seems to have jumped on me just flamed me for being so stupid. Stupid no, ignorant perhaps. When I encounter people like him I start doing research so that I will have some ammunition when I respond to him. If you are an expert on hard drive data obscuration or file storage then I would appreciate a Yes, No or answer below. For bonus points add something if it is pertinent. Thank you very much. Ron

Delete and overwrite do not obscure the original data. Yes / No

Repeatedly overwriting of the file with equal number of bytes will eventually overwrite of the original file memory address. Yes / No

I have a program that I wrote that when given a folder it will read (find search string) every file in that folder and it's sub folders. I could quite easily change read to overwrite in a loop with a variable for a counting loops. Any reason that would not work? If so then please explain why.

If a drive is inserted in a hot slot then it is a mere storage drive and therefore should not fight back when overwriting files. Yes / No

I have never worked with a computer that had multiple users. With the drive as a storage device will I be able to obscure all data on the drive? Yes / No
 
Ok - I am not an expert, but let me toss out a couple of comments and clarifiers:
Some things depend on the OS and disk management - sometimes there's a drive management layer that obscures where the data is physically written.
If you can for sure write over the media tracks/sectors where the data was, you will certainly obscure the data. Rewrite a few times over that part of the media, and there's not much to try and recover.
I understand that each recorded track probably doesn't perfectly overlay the previous recorded track, which can leave some fuzz along the edges. (ok, those probably aren't the precise terms, but probably express the concept.)
So, at some exotic level, the right kind of technology can look at what's left on the media and recreate what was there. (to some extent, depending on whatever)
There are programs that will do a "forensic wipe" on a hard drive. I don't know if they can really reach every nook and cranny, but I expect that for normal OS and drive formats, they work pretty well.
If you are trying to do this yourself using plain file access, it probably won't work. The logical file and folder structure is set up so you don't see track/sector, and even if you save over a file, the OS may just change its entry to mark it as deleted, and write the new version somewhere else on the drive.
If you loop across files and folders, the OS may do the same thing - old stuff is marked "deleted", new stuff goes in vacant space or the oldest deleted spaces. Or something. Depends on OS, file system, and - who knows? some other factors you have no control over.
Your program needs to find the physical location on the drive of the items to kill, then write to those locations. If you decide to do that, I'm sure it will be a great learning exercise.

Have fun, let us know how it goes!
Regards
Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top