Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!PAN.SSEC.HONEYWELL.COM!thompson From: thompson@PAN.SSEC.HONEYWELL.COM (John Thompson) Newsgroups: comp.sys.apollo Subject: re: Tar Message-ID: <9104030014.AA12617@pan.ssec.honeywell.com> Date: 3 Apr 91 00:14:43 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 47 > Not only is tar badly broken, but tape io is also broken (and always has > been). You can make this work but it's a pain. You have to rewind and > re-read each archive before writing the next. The sequence is something > like this: > > mt -f /dev/rct8 rew > tar cfv /dev/rct12 file1 file2 file3 ... > mt -f /dev/rct8 rew > dd if=/dev/rct12 of=/dev/null bs=1k > tar cfv /dev/rct12 file4 file5 file6 ... > mt -f /dev/rct8 rew > dd if=/dev/rct12 of=/dev/null bs=1k > dd if=/dev/rct12 of=/dev/null bs=1k > tar cfv /dev/rct12 file7 file8 file9 ... > ... No it isn't! (Small disclaimer -- I tested this at 10.3 -- you're on your own for 10.2 or 10.1) You only need to rewind the tape the first time (this, in essense, 'mounts' the tape device). After that, until you remove the tape, the device is there, and can be accessed. Therefore, all you need is mt -f /dev/rct8 rew tar cfv /dev/rct12 file1 file2 file3 ... tar cfv /dev/rct12 file4 file5 file6 ... tar cfv /dev/rct12 file7 file8 file9 ... ... I had no problem with this. I was able to run all the tars, rewind it, and go indexing (tar tvf /dev/rct12) and skipping around (mt -f /dev/rct12 fsf 2) with no problems. > This takes forever. In fact, it's intractable, since the time required is > exponential with the number of archives. That means it doesn't matter how > fast the tape drive is, it still takes too long. I know it's long in the case that you listed, but it isn't exponential. It's merely polynomial (n**2). The way you had did 0+1+2+3+4+...+(n-1) rewinds to put out 'n' tars. That's ( n**2 - n ) / 2, which is definitely O(n**2), not O(e**n). Sorry, but I just had to comment.... :-) -- jt -- John Thompson Honeywell, SSEC Plymouth, MN 55441 thompson@pan.ssec.honeywell.com Me? Represent Honeywell? You've GOT to be kidding!!!