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: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