Newsgroups: comp.unix.xenix.sco Path: utzoo!censor!geac!gjetor!adeboer From: adeboer@gjetor.geac.COM (Anthony DeBoer) Subject: Re: Piping TAR Message-ID: <1991May9.143254.20393@gjetor.geac.COM> Keywords: TAR, PIPES, REDIRECT Organization: Geac J&E Systems Ltd. References: <361@nic.cerf.net> <1991May7.001920.21111@mrspoc.Transact.COM> Date: Thu, 9 May 91 14:32:54 GMT In <1991May7.001920.21111@mrspoc.Transact.COM> steven@Transact.COM writes: >rembis@nic.cerf.net (Michael Rembis) writes: >>Hi. I need some help on a PC based XENIX system running version 2.3. >>I am trying to relocate a tar file that is on the hard disk out to >>a set of floppies. I have tried things like tar xf FILE | (tar cv2 -) >>and other combinations of that command with no luck. Does anyone know >>the right sequence to initiate this ? > >Unfortunately, you can't do it without first extracting the files from >the archive and then creating the floppy archive. TAR writes to separate >files when it extracts. There's no way to tell it to just copy the files >with all their headers to floppies. :^( If it were an archive small enough to fit on a single diskette, you might be in luck. Unfortunately, as you say, it needs a set of floppies, so you need to break the archive up. One thing that I've done with a single-diskette archive before (at least with cpio, and at this level there oughtn't to be a difference), is to use dd to read the archive from the hard disk (or even, if it was compressed, to zcat it and pipe that to dd) and have dd write it to diskette. Something like: $ dd if=foo of=/dev/rfd0135ds18 obs=18k conv=sync $ zcat foo | dd of=/dev/rfd0135ds18 obs=18k conv=sync You'd need to spend a little while with the dd man page and check out the exact options. From memory, those should be the right options with a 3.5" diskette, but your mileage may vary. Since tar is supposed to always put headers on block boundaries, you could play with the skip=nn and count=nn options and snip out sections of your archive directly to diskette, but this may be the hard way of doing it. -- Anthony DeBoer NAUI#Z8800 | adeboer@gjetor.geac.com | Programmer (n): One who Geac J&E Systems Ltd. | uunet!geac!gjetor!adeboer | makes the lies the Toronto, Ontario, Canada | #include | salesman told come true.