LISTSERV mailing list manager LISTSERV 16.0

Help for LINUX-L Archives


LINUX-L Archives

LINUX-L Archives


LINUX-L@LISTS.UFL.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LINUX-L Home

LINUX-L Home

LINUX-L  2007

LINUX-L 2007

Subject:

Re: Better way to do it:

From:

"N.J. Thomas" <[log in to unmask]>

Reply-To:

Platform Independent Linux List! <[log in to unmask]>

Date:

Mon, 6 Aug 2007 15:52:55 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (28 lines)

* Allen S. Rout <[log in to unmask]> [2007-08-06 08:51:13 -0400]:
> So, for debugging purposes (long story) I want to create a couple of
> files which are precisely 
> 
> 1042808832

    $ dd if=/dev/urandom of=foo bs=1k count=1018368

Ran on my FreeBSD desktop...I'm sure the Linux version is similar, if
not identical. Took about 46 seconds (wall clock) on my Pentium D
3.00GHz with 2 GiB RAM.

> Of course, doing this with /dev/random takes a while. :)

Use /dev/urandom if you can. /dev/random gives out 100% random bits, but
it takes a while to generate the entropy needed for this randomness,
hence the slowness. /dev/urandom gets some random bits from /dev/random,
but then uses it to seed more random numbers. They are not as "high
quality" randomness as /dev/random, but you get bits out *much* faster.
In short:

    /dev/random  = slow, very random
    /dev/urandom = fast, not so random

Choose whichever is more appropriate for your application.

hth,
Thomas

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

2020
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997

ATOM RSS1 RSS2



LISTS.UFL.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager