Xref: utzoo comp.unix.xenix:6129 comp.unix.questions:13829 Path: utzoo!attcan!uunet!munnari!murtoa.cs.mu.oz.au!mimir!hugin!augean!sirius!eco!nt!levels!ccdn From: ccdn@levels.sait.edu.au (DAVID NEWALL) Newsgroups: comp.unix.xenix,comp.unix.questions Subject: Re: adding to the end of tarred Archive 60 meg tapes Message-ID: <226@levels.sait.edu.au> Date: 24 May 89 14:22:38 GMT References: <479@mjbtn.MFEE.TN.US> Organization: Sth Australian Inst of Technology Lines: 36 In article <479@mjbtn.MFEE.TN.US>, root@mjbtn.MFEE.TN.US (Mark J. Bailey) writes: > Could somebody please explain to me how I can make use of the 'r' option > of tar to replace/add on at the end of a previous tar archive on an > Archive 60 stream tape cartidge under SCO Xenix 2.3.0??? I have tried > using the '/dev/nrct0' which is designed to leave the tape sitting where > it ended instead of rewinding it as it does under /dev/rct0. The simple answer to you question, is that you can't replace or add to a tar file when that tar file is on a cartridge. (I mean QIC; but this is probably true for other cartridges, too). Basically, in order to do what you want, the drive must be capable of switching from read to write, and back again. QIC's can't. However, you can store multiple "files" on the one cartridge. After you have written to tape (when you close the device, I think), an end of file mark is appended. The tape drive is capable of positioning the tape after an end of file mark. You can then switch from read to write mode (but not, I think, back again) and write a new file. What I am saying is that you can append a file to the end of a tape. (But not to the end of a tar image, stored on tape). The good news, then, is that you can achieve the effect that you want. When you want to add more files to your tape, you should seek to the end, and then start writing. How? It's easy. You have to know how many "files" are already on the tape, though. For each file that is already there, execute something like "cat < /dev/nrct0 > /dev/null". This will advance over each file. Then you do your normal "tar f /dev/rct0", which adds one more file to the tape. (I assume /dev/rct0 does not rewind the tape on open?) David Newall Phone: +61 8 343 3160 Unix Systems Programmer Fax: +61 8 349 6939 Academic Computing Service E-mail: ccdn@levels.sait.oz.au SA Institute of Technology Post: The Levels, South Australia, 5095