Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!news.funet.fi!funic!santra!fuug!demos!avg From: avg@hq.demos.su (Vadim G. Antonov) Newsgroups: comp.unix.questions Subject: Re: Tar file on multiple tapes Keywords: tar Message-ID: <1990Oct7.160605.13851@hq.demos.su> Date: 7 Oct 90 16:06:05 GMT References: <1990Oct6.235203.24093@uokmax.ecn.uoknor.edu> Reply-To: avg@hq.demos.su (Vadim G. Antonov) Organization: DEMOS, Moscow, USSR Lines: 36 In article <1990Oct6.235203.24093@uokmax.ecn.uoknor.edu> jay@alliant.backbone.uoknor.edu (Jay Liang) writes: >Is it possible to tar a single huge file on multiple tapes as dump >would do to handle file systems that are bigger than the tape >capacity? If your local tar does not support multi-tape feature (RTFM), you could write something like (Bourne shell): tar cf - your_files | while true do echo -n "Mount the (next) tape (type CR of ^C to quit):" gets < /dev/tty dd of=/dev/TAPE bs=20b count=SIZE done where TAPE is the name of RAW tape device and SIZE is the size of tape in 10K records. If you have no (very useful) gets, the source follows: main() { char c; while( read(0, &c, 1) != 1 ) { write(1, &c, 1); if( c == '\n' ) exit(0); } exit(1); } (Hmmm... try to guess why I use read/write instead of getc/putc :-). Vadim Antonov DEMOS, Moscow, USSR