Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!netsys!macomh!macom1!larry From: larry@macom1.UUCP (Larry Taborek) Newsgroups: comp.unix.wizards Subject: Re: Help with tar Message-ID: <4848@macom1.UUCP> Date: 4 May 89 17:02:02 GMT References: <2175@wpi.wpi.edu> Organization: CENTEL Federal Systems, Reston, VA. 22091-1506 Lines: 55 From article <2175@wpi.wpi.edu>, by gshapiro@wpi.wpi.edu (Gregory N. Shapiro): > I am trying to make a tape archive of a directory and a file using tar > on an Encore MultiMax. The first part comes out successful: > > tar c -C /usr1 gshapiro > > That dumps everything in my directory to tape. The second part is > where I have trouble. I want to add to that archive a single file > (/usr/spool/mail/gshapiro). [examples of what he's tried] Greg, Some Unix's have tar's that are not capable of adding a file to a tar archive. Most unixes CAN put multiple tar's on the same tape. What you have to do is use the no-rewind device driver, so that after you put on a archive, the tape drive doesn't rewind, and then you can put on the next tar archive. lets say that ct0 is your tape driver. If so, then nct0 would be the No-rewind tape driver. To put on your origional archive you would type: tar -cf /dev/nct0 gshapiro Then to add another tar archive to the tape: tar -cvf /dev/ct0 /usr/spool/mail/gshapiro Notice that the ct0 tape driver is used the last time to rewind the tape on completion. Now to extract the first archive, just do the same as you would normally. To extract the second tape archive you would type. tar -tvf /dev/nct0 And then: tar -xvf /dev/ct0 To extract the second. Note that this does not add to a tape archive, but instead puts a second tape archive after the first. You can use this technique to put many tape archives on a single tape. Hope that helps -- Larry Taborek ..!uunet!grebyn!macom1!larry Centel Federal Systems larry@macom1.UUCP 11400 Commerce Park Drive Reston, VA 22091-1506 703-758-7000