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. [root at 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 [root at nasbackup ~]# [root at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/opensolaris-help/attachments/20091124/bd946a8f/attachment.html>