On Sunday 2013-10-20 16:28, Carlos E. R. wrote:
cer@Eleanor4:~/bin> dd if=/dev/random of=sample bs=100 count=1 ; l sample 0+1 records in 0+1 records out 22 bytes (22 B) copied, 0.00131574 s, 16.7 kB/s - -rw-r--r-- 1 cer users 22 Oct 20 16:08 sample
cer@Eleanor4:~/bin> dd if=/dev/random of=sample bs=100 count=1 ; l sample 0+1 records in 0+1 records out 9 bytes (9 B) copied, 17.0424 s, 0.0 kB/s - -rw-r--r-- 1 cer users 9 Oct 20 16:08 sample cer@Eleanor4:~/bin>
Why if the input is /dev/random, the size of the output file is not 100 bytes?
Because dd stops when it the syscall returns an error. But it won't tell you that. So stop using dd already. Use ddrescue - it's saner in every aspect. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org