mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Jon Grant <jg@jguk.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: dd if=/dev/random of=data.bin bs=512 count=1
Date: Mon, 18 May 2009 01:01:58 +0900	[thread overview]
Message-ID: <2f11576a0905170901x41e15f65sf10bb5ee36050d14@mail.gmail.com> (raw)
In-Reply-To: <19ac3f7a0905170822q28255239nea01b56d52e3ddf8@mail.gmail.com>

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


> Please include my email address in replies,  as I'm not a member of this list.
>
> Best regards, Jon
>
> $ 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
>
> $ dd --version
> dd (coreutils) 6.10
>
> $ uname -a
> Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC
> 2009 i686 GNU/Linux
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

  reply	other threads:[~2009-05-17 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17 15:22 Jon Grant
2009-05-17 16:01 ` KOSAKI Motohiro [this message]
2009-05-23 19:12   ` Jon
2009-05-23 19:20     ` Samuel Thibault
2009-05-23 19:38     ` Matt Mackall
2009-05-24  0:59     ` Bill Davidsen
2009-05-17 16:27 ` Bernd Eckenfels

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f11576a0905170901x41e15f65sf10bb5ee36050d14@mail.gmail.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=jg@jguk.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®