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 - 17:46:25 AKDT


> > The simplest solution would be to use dd to create a file from
> > /dev/zero's contents.
>
> Thanx Arthur!
>
> I had to give my 'on call Linux guru' Dave a ring for some help because
> there aren't enough examples in 'info dd' or 'man dd' for me to
> figure it out.
>
> Here's the command we ended up with:
>
> dd if=/dev/zero of=zeros bs=1000 count=2000000

That would do it, but I would recommend using a block size of 1024 vice 1000,
since that's precisely what 1KB is. Whether or not 1MB is equal to 1024*1024
or 1024*1000 has been the source of much contention (especially among HD
manufacturers), so your count is fine as a multiple of ten. I can't remember
how big a file you wanted, but just to make sure you understand, that count
will produce a 2GB file (final size is bs*count). . .

        --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 - 18:30:27 AKDT