Tuesday 30 April 2013

Easy hard-disk fill to thwart undelete

A Windows Command Batch can fill the hard drive surprisingly quickly, if you've deleted some files and wish to ensure that they can't be recovered by a simple undelete utility.

First, create a file of rubbish to fill the disk with, if you can't find a suitable file of garbage to use, a simple
dir >>fill.dat
repeated a few times (up arrow and enter at the command prompt) will do the trick. Keep going until it's a couple of hundred k in size.

Then create a fill.bat as follows

@echo off
:start
type fill.dat>>delete.txt
goto start


Run the batch fill and stand back and marvel at how quickly delete.txt grows.
From what I've read on Slashdot discussions about disk recovery, it really isn't going to be possible for anyone to get at your old files (notes, embarrassing photos and music, etc!) once the space they occupied is overwritten! You'll probably want to leave a note about deleting the massive text file :)

No comments:

Post a Comment