Does anybody know what¹s wrong here?  I expect dd to be able to read from
stdin just as well as from a regular file or device.  But when I use dd to
read from stdin, it can only read partial records, and then when it¹s done,
it will never terminate properly.  Meaning - ³time² reports the finished
time of the process, but then I have to hit Ctrl-C to progress any further.

In my example below, random-1G-file literally contains a random data stream,
precisely 1024*1024*1024 bytes long.

The second command works perfectly, while not reading from stdin, but that
doesn¹t do me any good because in real life I want to feed a data stream
onto the tape via a pipe.



[r...@nasbackup ~]# cat random-1G-file | time dd of=/dev/rmt/0n bs=256k ;
time mt -f /dev/rmt/0 rewind
0+39993 records in
0+39993 records out

real       23.4
user        0.0
sys         0.6

^C


real    0m23.313s
user    0m0.001s
sys     0m0.002s



[r...@nasbackup ~]#
[r...@nasbackup ~]# time dd if=random-1G-file of=/dev/rmt/0n bs=256k ;  time
mt -f /dev/rmt/0 rewind
4096+0 records in
4096+0 records out

real    0m21.490s
user    0m0.013s
sys     0m0.779s

real    0m23.328s
user    0m0.001s
sys     0m0.002s

_______________________________________________
opensolaris-help mailing list
[email protected]

Reply via email to