NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

odd /dev/random behavior with dd ?



Hi, 'dd' seems to behave different if the 'if' is /dev/random than if it is anything else, e.g. /dev/zero:

# sh 
# dd if=/dev/zero of=zero.out bs=65536 count=1
1+0 records in
1+0 records out
65536 bytes transferred in 0.001 secs (65536000 bytes/sec)

# ls -l zero.out
-rw-r--r--  1 root  wheel  65536 Jan  4 21:30 zero.out

# dd if=/dev/random of=random.out bs=65536 count=1
0+1 records in
0+1 records out
32 bytes transferred in 0.001 secs (32000 bytes/sec)

# ls -l random.out
-rw-r--r--  1 root  wheel  32 Jan  4 21:30 random.out

# dd if=/dev/random of=random.out.2 bs=65536 count=2048
0+2048 records in
0+2048 records out
65536 bytes transferred in 0.054 secs (1213629 bytes/sec)

# ls -l random.out.2
-rw-r--r--  1 root  wheel  65536 Jan  4 21:31 random.out.2

# uname -a
NetBSD arm64 9.99.102 NetBSD 9.99.102 (MIKE64) #0: Wed Oct 26 22:54:20 UTC 2022  mac@arm64:/usr/obj/sys/arch/evbarm/compile/MIKE64 evbarm




Am I doing something stupid?

Thanks!
Mike



Home | Main Index | Thread Index | Old Index