[Nottingham] 1GB of \0 (aka null)

Martin martin at ml1.co.uk
Mon Mar 27 10:00:12 BST 2006


Martin Garton wrote:
> On Mon, 2006-03-27 at 09:42 +0100, Martin wrote:
> 
> 
>>I'll start the fun with just one:
>>
>>dd if=/dev/zero count=1G
> 
> 
> I think that will get you a lot more than 1G of zeros because the
> default block size is 512.
> 
> i.e.:
> 
> dd if=/dev/zero count=1 of=test
> 
> .. creates a file 512 bytes long.
> 
> so for me:
> 
> dd if=/dev/zero count=2M
> 
> gives the requires 1G.

Quite right! Ooooops...

Try:

dd if=/dev/zero bs=1k count=1M


Perhaps don't try 1Y for the count..!

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list