Re: need to create a file of all binary zeros


Subject: Re: need to create a file of all binary zeros
From: Arthur Corliss (arthur@corlissfamily.org)
Date: Sun Aug 25 2002 - 11:21:04 AKDT


> Problem:
> I need to generate a file that is 2,000,000 KB and filled with binary
> zeros. Can this be done on my Linux box? (I have Perl installed.)
> For some reason I can't cut-n-paste binary zeros on my Win2K machine.
>
> Background Info:
> I have a 270GB Snap Server that I need to wipe of personal info to include
> SSNs, phone #s, FOUO info, etc. This requires a 'DOD wipe' which is
> three passes of alternating binary ones and zeros, then a fourth
> pass of any randomn ASCII character between a and Z. PGP disk won't
> wipe network drives so I came up with this idea to fill up the unit
> with files comprised of ones and zeros. I wrote three VBScripts to
> create files comprised of FF, AA, and 55 (11111111, 10101010, and
> 01010101) but for some reason Windows won't copy the ASCII character
> that is 00 hex.
> (There's probably some good reason for this...)

The simplest solution would be to use dd to create a file from /dev/zero's
contents. But, yes, if you really want Perl to do it, you can. Just use the
binmode call on an open file handle, and start printing numeric values to it. . .

        --Arthur Corliss
          Bolverk's Lair -- http://arthur.corlissfamily.org/
          Digital Mages -- http://www.digitalmages.com/
          "Live Free or Die, the Only Way to Live" -- NH State Motto

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Sun Aug 25 2002 - 12:05:05 AKDT