[NTLUG:Discuss] filling empty partition space with zeros

Alvin Goats agoats at compuserve.com
Wed Feb 18 19:33:56 CST 2009


Check out the secure delete series of srm, sfill, smem and sswap. sfill 
will do empty space only

sfill v3.1 (c) 1997-2003 by van Hauser / THC <vh at thc.org>

Syntax: sfill [-fiIlvz] directory

Options:
        -f  fast (and insecure mode): no /dev/urandom, no synchronize mode.
        -i  wipe only inodes in the directory specified
        -I  just wipe space, not inodes
        -l  lessens the security (use twice for total insecure mode).
        -v  is verbose mode.
        -z  last wipe writes zeros, not random data.

sfill does a secure overwrite of the free space on the partition the 
specified
directory resides and all free inodes of the directory specified.
Default is secure mode (38 writes).
You can find updates at http://www.thc.org

So, sfill -llz should be just about what you want.

Alvin

Patrick R. Michaud wrote:
>  
> On Wed, Feb 18, 2009 at 09:03:12AM -0600, terry wrote:
>   
>> On Tue, Feb 17, 2009 at 9:45 AM, Ed Leach <ntlug at levelofdetail.com> wrote:
>>     
>>> I'd like to fill the empty space of an ext3 partition with zeros in
>>> order to make it compress better. [...]
>>> I see this suggestion:
>>>
>>>    dd if=/dev/zero of=/path/to/partition/zerofill.tmp & rm
>>> /path/to/partition/zerofill.tmp
>>>       
>> Write zeros to the partition, not the mount point.
>> (Probably shouldn't be mounted either, but I know know if it matters,
>> someone else should comment on whether it should be mounted or not...
>> but...)
>> [...]
>>    dd if=/dev/zero of=/dev/hda2
>>     
>
> Note that the original request was to "fill the empty space with zeroes",
> not "wipe the entire partition".  There's a significant difference.  :-)
>
> In particular, filling the empty space with zeroes doesn't wipe out
> any existing files on the partition.
>
> Pm
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
>   



More information about the Discuss mailing list