[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4A189BDA.5050002@tmr.com>
Date: Sat, 23 May 2009 20:59:06 -0400
From: Bill Davidsen <davidsen@....com>
To: Jon <jg@...k.org>
CC: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-kernel@...r.kernel.org
Subject: Re: dd if=/dev/random of=data.bin bs=512 count=1
Jon wrote:
> Hello KOSAKI,
>
> Thank you for your reply.
>
> KOSAKI Motohiro wrote:
>>> Hello
>>>
>>> Issuing this command, I expected to get a file 4096 bytes in size.
>>> Could someone let me know if I have missed something..? Or is there a
>>> problem with using /dev/random this way?
>>>
>>> if I have a count=10 it hangs forever (several hours).
>>>
>>> Changing to use /dev/urandom and it generates the file ok.
>>
>> you already have the answer. /dev/random might blocked, /dev/urandom
>> doesn't.
>
> Is this a "feature" of /dev/random ? ..it does not seem very useful to
> have it able to block for so long.
>
Of course. /dev/random generates better random numbers (in the sense of less
predictable), while /dev/urandom gives you some pseudo-random bits, which mat or
may not be appropriate for your task. For timing disk speed /dev/zero is faster
and less overhead.
> Please include my email address in replies, as I'm not a member of this
> list.
>
> Best regards, Jon
--
Bill Davidsen <davidsen@....com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists