Jump to content

Zeroing empty space?


weEvil

Recommended Posts


You need a tiny utility called Nullfile which will write a dummy file in the current directory and fill it with 0s. When the file can no longer write (disk full) it then deletes the file and closes. This effectively does what you want I think. It iwas written to make the compression of free space easier for disk imaging/cloning.

You can get it here:

http://montgomeryco.com/bfiles/Nullfile/

and this one works just fine, though I think there is a version 1.02 out there somewhere. download the file, place it in the root, and rename it nullfile.exe. It works fairly fast, though it doesn't seem so. Now you can run it in a commsand window. If you stop the file in the middle, remember to delete the dummy.xxx file it creates. It is a good idea to defrag the disk first and consolodate empty space.

I read something about a 4GB size limit on the dummy file, so if that is the case, then I'm sure you could rename the file and run Nullfile multiple times.

Update: Okay, I found the source. It was written by Matthias Jordan and here is his website. Nullfile v1.02 is a bit down the page after all the cloning stuff.

http://www.feyrer.de/g4u/

From that site there's also this:

Windows "onboard" solution:

Aparently Windows XP comes with a tool to do some harddisk encryption that can also be used to write 0-bytes to the disk. To do so, run the following command: cipher /W:C: for drive C:. You will need to abort (Control+C) after the first round, else it will write random data after filling the disk nicely with 0-bytes.

Windows "sdelete":

Microsoft provides a tool "sdelete" (http://www.microsoft.com/technet/sysinternals/FileAndDisk/SDelete.mspx) that offers a switch -c in recent versions (only!) to zero free space on drives.

Run any of these right before shutting down the operating system to create an image with g4u, and see the size difference.

Hope this helps. :^)

Edited by DonDamm
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...