Help with tar

Larry Taborek larry at macom1.UUCP
Fri May 5 03:02:02 AEST 1989


>From article <2175 at wpi.wpi.edu>, by gshapiro at 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 at macom1.UUCP		11400 Commerce Park Drive
						Reston, VA 22091-1506
						703-758-7000



More information about the Comp.unix.wizards mailing list