root@mjbtn.MFEE.TN.US (Mark J. Bailey) (05/22/89)
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. What I want to be able to do is be able to use the 'r' option to allow me to keep a cartridge of various and assundry things that are desireable to keep, but not enough so to keep on the harddisk media. For example, if I get another source package I would like to hold onto, how can I go about sticking it onto the end of the archive? What options should I use, and which ones shouldn't I use with tar? What about block sizes? Where does /dev/nrct0 fit in to all this? Any help would be greatly appreciated! Please email responses. Thank you. Mark. -- Mark J. Bailey "Ya'll com bak naw, ya hear!" USMAIL: 511 Memorial Blvd., Murfreesboro, TN 37129 ___________________________ VOICE: +1 615 893 0098 | JobSoft UUCP: ...!{ames,mit-eddie}!killer!mjbtn!mjb | Design & Development Co. DOMAIN: mjb@mjbtn.MFEE.TN.US | Murfreesboro, TN USA
ccdn@levels.sait.edu.au (DAVID NEWALL) (05/24/89)
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