lkml.org 
[lkml]   [2009]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dd if=/dev/random of=data.bin bs=512 count=1
In article <19ac3f7a0905170822q28255239nea01b56d52e3ddf8@mail.gmail.com> you wrote:
> Issuing this command, I expected to get a file 4096 bytes in size.

one time 512 is 512 not 4096.

> if I have a count=10 it hangs forever (several hours).

It depends on your harware and usage type (mouse atached?) how much entropy
is generated and filled into the pool. If you drain it, it will hang for
/dev/random and generate PRNG data with /dev/urandom.

You should think carefully about sucking too many random bytes from /dev/random.

> $ dd if=/dev/random of=data.bin bs=512 count=1
> 0+1 records in
> 0+1 records out
> 8 bytes (8 B) copied, 4.47366 s, 0.0 kB/s

I am not sure why you only get 8bytes here, but I would suggest to use "bs=1
count=256" anyway.

Gruss
Bernd


\
 
 \ /
  Last update: 2009-05-17 19:19    [W:0.076 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site