Random file of set length

Kevin Buettner plug-discuss@lists.plug.phoenix.az.us
Wed, 11 Sep 2002 15:46:31 -0700


On Sep 11,  3:35pm, Gilbert T. Gutierrez, Jr. wrote:

> I want to create a random file of 5MB.  How do I do that?

dd if=/dev/random of=myrandomfile bs=1024 count=5k

You may also want to try /dev/urandom in place of /dev/random.  (The
results will be less random, but the file should be created quite a
lot faster.)

Kevin