[vox-tech] How to erase unused disk space?

Ryan cjg5ehir02 at sneakemail.com
Mon Jan 16 09:40:39 PST 2006


On Monday 16 January 2006 09:11 am, Rod Roark rod-at-sunsetsystems.com 
|lugod| wrote:
> I have Ubuntu installed in a VMware virtual machine, which is just
> a collection of disk files, the largest of which is the disk image.
>
> I want to make a tarball of these files of minimal size.  This seems
> to require erasing the contents of the unused areas of the virtual
> ext3 filesystem, so they will compress optimally.  Is there some
> standard utility that will do this?
>
> Note this is not a "data security erase" problem where the unused
> sectors are to be repeatedly overwritten with different bit patterns;
> I just want to clear them once to binary zeros.

cat /dev/zero > /zero;rm -f /zero

That's probably the easiest. Make sure you run it as root, ext2/3 reservers a 
percentage of the disk for root.

-- 
Ryan Castellucci - http://ryanc.org/
GPG Key: http://ryanc.org/files/publickey.asc


More information about the vox-tech mailing list