Dino 'Connect' Bojadjievski's blog on computer programming, computer science and IT in general. Also serves as a random outlet.
Hit counter:
Monday, October 24, 2011
Data deletion and retrieval
The problem here is, it doesn't actually work. Deleting files is, in reality, far more difficult than emptying your recycle bin. Since the hard drive is basically just a big magnetic plate (or a composition of smaller magnetic plates), it stores everything using bits and bytes of information. And because a single bit ranges from 0 to 1, a single byte goes from 0 to 255. Now, if you had a 16-byte text file, and it went something like 10010110 01100101 etc. etc. what would be the deleted version of the file?
Bet you don't know.
Simple, the deleted version of the file would be the file itself. See, since a byte ranges from 0-255, there isn't a n empty state for memory blocks. What happens when you delete a file is that your operating system just removes the reference to that block (or those blocks, as rarely does a file occupy one block only) from its table. The file is very much alive until you write something over its initial position on the drive, and that could take quite a while. So there's actually a neat trick of restoring data information from deleted files: you just read them as if they were still there. Now this can be done by hand, but it's a major hassle, so it's far smarter and easier to use a data retrieval utility, like this bit of freeware here. It will automatically search your hard drive, comparing blocks to your OS' references, and whatever doesn't match- it's your file. The algorithm is simple, and usually works. Just to be safe, though, i recommend keeping this kind of software on external media such as a thumb drive, so you don't overwrite anything you actually need with this one when downloading and installing.
So now that we've raised the dead, how do we put them back in their graves for good?
As i said, by overwriting them with other data. Now this isn't easy, and is usually done in multiple passes, like 7 or so. And to do it, you need some special ware, like this guy here - also freeware. There are also commercial utilities as well as software packets that do this- personally i use the wiper in my Norton Internet Security for data wiping. Now, the catch in actually deleting the files is that, not only you want to pass the procedure n times, but on the n-th time you need to write all zeros. Why? Well, it's cool. Also, there cannot be a file associated with all 0s, as most OS's use zeros somewhere in the pattern to indicate non-referenced blocks or something.
Well, regardless of the algorithms used for these programs (i find them to be simple, at least on the first glance), they're handy bits of software to have around. We all have files we need deleted, and all have experienced the frustration of deleting a file we actually need. So, get those two, put them on a thumb-drive and set them to read-only so you don't delete them. Then you'll have a hassle un-deleting your un-deleter.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment