dd + /dev/urandom
T. Horsnell
tsh at mrc-lmb.cam.ac.uk
Thu Aug 18 17:01:52 UTC 2005
OK guys, what going on here?
Why is the length of dd's output file truncated if the job is
paused and backgrounded? The problem is reproducible but the
truncated lengths differ. It doesnt happen for if=/dev/zero
Cheers,
Terry.
[root at fmtest]# uname -a
Linux fmtest.lmb.internal 2.6.11-1.35_FC3 #1 Mon Jun 13 00:52:08 EDT 2005 i686 i686 i386 GNU/Linux
[root at fmtest]# dd if=/dev/urandom of=junk100M.uran bs=1000000 count=100
100+0 records in
100+0 records out
[root at fmtest]# ls -l junk100M.uran
-rw-r--r-- 1 root root 100000000 Aug 18 17:54 junk100M.uran
[root at fmtest]# dd if=/dev/urandom of=junk100M.uran bs=1000000 count=100 &
[1] 4516
[root at fmtest]# 100+0 records in
100+0 records out
[1] Done dd if=/dev/urandom of=junk100M.uran bs=1000000 count=100
[root at fmtest]# ls -l junk100M.uran
-rw-r--r-- 1 root root 100000000 Aug 18 17:54 junk100M.uran
[root at fmtest]# dd if=/dev/urandom of=junk100M.uran bs=1000000 count=100
Suspended
[root at fmtest]# bg
[1] dd if=/dev/urandom of=junk100M.uran bs=1000000 count=100 &
[root at fmtest]# 99+1 records in
99+1 records out
[1] Done dd if=/dev/urandom of=junk100M.uran bs=1000000 count=100
[root at fmtest]# ls -l junk100M.uran
-rw-r--r-- 1 root root 99506220 Aug 18 17:55 junk100M.uran
More information about the fedora-list
mailing list