How to put several files on 1 tape

Larry Autry larry at sgistl.SGI.COM
Sun Jul 10 03:05:11 AEST 1988


In article <755 at leah.Albany.Edu>, rds95 at leah.Albany.Edu (Robert Seals) writes:
> 
> Here's one... either I'm being real stupid (probably) or something
> is strangly missing in Unix tape facilites (gosh).
> I want to put several files on a tape, each separated with file marks.
> --------------------------------------------------------
> |BOT|  file1    |FM|  file2    |FM| .....       |EOT|
> ---------------------------------------------------------
> How?
> rob

Using tar, use the norewind tape device driver.  Same with cpio.

tar example
		mt rew
		tar cv2 file.ext
		tar cv2 file2.ext
		tar cv2 file3.ext
		mt rew

To access these files use 'mt fsf n' where 'n' = file number minus one.

cpio example
		mt rew
		cpio -ovh2 file.ext
		cpio -ovh2 file2.ext
		cpio -ovh2 file3.ext
		mt rew

To position these files use 'mt fsf n' where 'n' = file number minus one.
If 'mt' is not available on your system.  Read over the file not needed
with the 't' option instead of the 'x' in 'tar' or the 'i' in 'cpio'.
example		tar tv2
		  or
		cpio ivht2

Then to read the files:	tar xv2
			  or
			cpio -ivhmud2


-- 
					Larry Autry
larry at sgistl.sgi.com
       or
{ucbvax,sun,ames,pyramid,decwrl}!sgi!sgistl!larry



More information about the Comp.unix.questions mailing list