[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9734: [solaris] `dd if=/dev/urandom of=file bs=1024k count=1' gets a
From: |
John Reiser |
Subject: |
bug#9734: [solaris] `dd if=/dev/urandom of=file bs=1024k count=1' gets a file of 133120 bytes |
Date: |
Wed, 12 Oct 2011 08:10:18 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Thunderbird/3.1.15 |
> I found this in the man page of /dev/urandom on Solaris: "The limitation per
> read for /dev/random is 1040 bytes. The limit for /dev/urandom is (128 *
> 1040 = 133120)." That seems to be the reason but I think dd should handle
> that and check the return value of the read() system call and make sure
> 1024k bytes have really been read from /dev/urandom.
"bs=N" means "write(,,read(,,N))" [error checking has been elided for
presentation here] so if the read is short then the write will be also.
Check the manual page. Consider ibs=, obs=, iflag=fullblock.
--