|
From: Henry Y. <he...@Ae...> - 2010-08-05 14:57:31
|
On Thu, Aug 05, 2010 at 10:09:06AM -0400, John Drescher wrote: > On Thu, Aug 5, 2010 at 8:57 AM, Henry Yen <he...@ae...> wrote: > > On (at least) Linux, /dev/random will quickly block - use /dev/urandom instead. > > Since these tend to be slow I would just create a large file from one of these. Well, for this case you shouldn't simply pick one or the other. Again, on Linux, you generally can't use /dev/random at all -- it will block after reading just a few dozen bytes. /dev/urandom won't block, but your suggestion of creating a large file from it is very sensible. /dev/urandom seems to measure about 3MB/sec or thereabouts, so creating a large "uncompressible" file could be done sort of like: dd if=/dev/urandom of=tempchunk count=1048576 cat tempchunk tempchunk tempchunk tempchunk tempchunk tempchunk > bigfile -- Henry Yen Aegis Information Systems, Inc. Senior Systems Programmer Hicksville, New York |