Random file of set length

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Buettner
Date:  
Subject: Random file of set length
On Sep 11, 3:40pm, Matt Alexander wrote:

> On Wed, 11 Sep 2002, Gilbert T. Gutierrez, Jr. wrote:
>
> > I want to create a random file of 5MB. How do I do that?
>
> dd if=/dev/zero of=somefile bs=1024k count=5

        ^^^^^^^^^


That won't be random...

(Try /dev/random or /dev/urandom instead.)

Kevin