[comp.std.unix] tar or cpio? Tar, of course!

rbj@icst-cmr.arpa (Jim Cottrell) (05/11/87)

To: gwyn@brl, hoptoad!gnu@sally.utexas.edu
Cc: std-unix@sally.utexas.edu
From: rbj@icst-cmr.arpa (Jim Cottrell)

? From: gnu@hoptoad.UUCP (John Gilmore)
 
? I don't know anybody who's ever had trouble reading a tar tape...
? All versions of tar are compatible.

Depends on what you mean. I have had troubles reading the original
TPC V6 & V7 distribution tapes under 4.2 BSD. Perhaps the format has
changed since then. Anyone have a tar that will read these tapes?

? There is the additional advantage of a public domain implementation of
? the proposed tar standard (written by me, available from mod.sources),

Kudos, John. I hope you also fixed special files as well. Ever try and
make a tar tape of the root? It barfs when it gets to /dev.

? From: Doug Gwyn <gwyn@brl.arpa>
 
? In the real world one HAS to have a working "tar" if one exchanges files...

If I were paranoid I might think TPC was trying to limit this.
 
? I would prefer to remove tape archive format altogether from what is
? supposed to be a program/system interface specification (1003.1).  There
? simply isn't a single universal interchange medium anyway (not every
? system has 1/2" magtape, for example).

Tarchives are useful even they are never put on tape.

If it is still not clear, I favor tar as well. Perhaps the features
that motivated cpio's creation should be added to tar, as John has done.

I would also like to see an option not to cross mount points, that is
stay on the same partition. This should be added to several major utilities.

	(Root Boy) Jim "Just Say Yes" Cottrell	<rbj@icst-cmr.arpa>
	I hope I bought the right relish...  zzzzzzzzz...

Volume-Number: Volume 11, Number 19

jsdy@hadron.uucp (Joseph S. D. Yao) (05/12/87)

Reply-To: jsdy@hadron.uucp (Joseph S. D. Yao)

In article <8018@ut-sally.UUCP> rbj@icst-cmr.arpa writes:
>Depends on what you mean. I have had troubles reading the original
>TPC V6 & V7 distribution tapes under 4.2 BSD. Perhaps the format has
>changed since then. Anyone have a tar that will read these tapes?

At this early hour, I can't think what "TPC" means.  When someone
tells me, I shall probably kick myself.  On the other hand, the
first UUG V6 & V7 distribution tapes were in tp or stp format.
(Remember those?)  When we first started switching to tar, we had
some problems with a tar for V6 and PWB System 1.X.  If I remember
correctly, the first few read OK and wrote trash.  They were based
on (the new) V7 tar.

Oh.  The Phone Company.  OK.  Cutesy I am  n o t  at this hour of
the morning.  (One dissenting vote heard from.)  My comment stands:
the V6 and PWB tapes, at least; and prob'ly V7 as well, were not
based on tar.

[ Readers are not required to read articles early in the morning just
because I often post them then.  :-)

The tar format in POSIX is derived from Version 7, as are most of the
tar programs in use today.  -mod ]

>I would also like to see an option not to cross mount points, that is
>stay on the same partition. This should be added to several major utilities.

Easy enough:
	[%$] su
	Password:
	# mount
	/ on /dev/disk-0
	/prime on /dev/disk-1
	/prime/secundus on /dev/disk-2
	# unmount /dev/disk-2
	# cd /prime
	# tar xv

Other than that, this is awfully hard to do unless you are willing
to break modularity by sticking info about the FS into programs
which have no need to know about it whatsoever.

	Joe Yao		jsdy@hadron.COM (not yet domainised)
	hadron!jsdy@{seismo.CSS.GOV,dtix.ARPA,decuac.DEC.COM}
{arinc,att,avatar,cos,decuac,dtix,ecogong,kcwc}!hadron!jsdy
     {netex,netxcom,rlgvax,seismo,smsdpg,sundc}!hadron!jsdy

Volume-Number: Volume 11, Number 23

rbj@icst-cmr.arpa (Jim Cottrell) (05/13/87)

In article <8018@ut-sally.UUCP> rbj@icst-cmr.arpa writes:
>Depends on what you mean. I have had troubles reading the original
>TPC V6 & V7 distribution tapes under 4.2 BSD. Perhaps the format has
>changed since then. Anyone have a tar that will read these tapes?

Ok, the joke's on me. I'll try dump. Now on to Joe Yao's articles.
 
? >I would also like to see an option not to cross mount points, that is
? >stay on the same partition. This should be added to several major utilities.
? 
? Easy enough:
? 	[%$] su
? 	Password:
? 	# mount
? 	/ on /dev/disk-0
? 	/prime on /dev/disk-1
? 	/prime/secundus on /dev/disk-2
? 	# unmount /dev/disk-2
? 	# cd /prime
? 	# tar xv
? 
? Other than that, this is awfully hard to do unless you are willing
? to break modularity by sticking info about the FS into programs
? which have no need to know about it whatsoever.

Find on BSD4.3 has -xdev, and others have -prune. It is often desirable
to restrict searches to a single file system. Besides, to unmount /usr,
you have to kill all the daemons, and then the only editor you  have is ed.

? In article <8006@ut-sally.UUCP> guy@sun.com (Guy Harris) writes:
? >	3) It is less common.  Almost all UNIX systems that support
? >	   "cpio" also support "tar"; many UNIX systems that support
? >	   "tar" do not support "cpio".
? 
? Guy's arguments are mostly good, especially when reasoning about
? the byte-order problem.  It should perhaps be noted, though, that
? cpio pre-dates tar, and that there are probably numerous systems
? "out there" that have cpio but not tar.  This, at least, seems to
? be one of the arguments used by X/OPEN.

Saying cpio predates tar might be strictly true, but tar hit the streets 
first. Do you know of any UNII that have cpio but not tar?

? 	Joe Yao		jsdy@hadron.COM (not yet domainised)
? 	hadron!jsdy@{seismo.CSS.GOV,dtix.ARPA,decuac.DEC.COM}
? {arinc,att,avatar,cos,decuac,dtix,ecogong,kcwc}!hadron!jsdy
?      {netex,netxcom,rlgvax,seismo,smsdpg,sundc}!hadron!jsdy
 
	(Root Boy) Jim "Just Say Yes" Cottrell	<rbj@icst-cmr.arpa>
	I just had my entire INTESTINAL TRACT coated with TEFLON!


Volume-Number: Volume 11, Number 24

jsdy@hadron.uucp (Joseph S. D. Yao) (05/13/87)

From: jsdy@hadron.uucp (Joseph S. D. Yao)

This is getting a bit far from UNIX/POSIX standards, but:

In letter <8705122317.AA00613@icst-cmr.arpa.ARPA> rbj@icst-cmr.ARPA (Root Boy Jim) writes:
>In article <8018@ut-sally.UUCP> rbj@icst-cmr.arpa writes:
>>			... I have had troubles reading the original
>>TPC V6 & V7 distribution tapes under 4.2 BSD.
>Ok, the joke's on me. I'll try dump. Now on to Joe Yao's articles.

Dump won't work either.  If I remember correctly, the first two blocks
(on V6) were boot blocks for two different tape drives, followed by
some stand-alone programs, and (perhaps in the next file) an IMAGE of
a V6 file system.  Then there were mixtures of disk images and tp tape
files.  V7 I'm not sure about; but as tar started (slightly buggy) in
V7, I vaguely recall that the distribution tapes were  n o t  in tar
format, either.  I may not be right about that last.

Note, BTW, that the V6 file system is not mountable on a V7 or later
system, including all current Berkeley and USG releases.

>? >I would also like to see an option not to cross mount points, that is
>? >stay on the same partition. This should be added to several major utilities.
>?		... this is awfully hard to do unless you are willing
>? to break modularity by sticking info about the FS into programs
>? which have no need to know about it whatsoever.
>Find on BSD4.3 has -xdev, and others have -prune. It is often desirable
>to restrict searches to a single file system. Besides, to unmount /usr,
>you have to kill all the daemons, and then the only editor you  have is ed.

My statement stands.  Berkeley is  n o t  the best reference for proper
modularisation.  Find needs to know about a heckuva nawful lot, but it
would perhaps be desirable to have more general-purpose tools.

>? In article <8006@ut-sally.UUCP> guy@sun.com (Guy Harris) writes:
>? >			  ...  Almost all UNIX systems that support
>? >	   "cpio" also support "tar"; ...
>?			..  It should perhaps be noted, though, that
>? cpio pre-dates tar, and that there are probably numerous systems
>? "out there" that have cpio but not tar.
>Saying cpio predates tar might be strictly true, but tar hit the streets 
>first. Do you know of any UNII that have cpio but not tar?

I believe, Doctor McCoy, that that is what I just said.  Yes, cpio
hit the streets first, in PWB System 1.0, and in all of its descen-
dants, yeah down unto System III and System V Release 3.0 Version
1.1.  Those first few releases had no tar.  (I know, what held them
together then?)

And it's UNIXI, not UNII.  (Finally, something about standards, eh?)

From: hadron!jsdy@seismo.css.gov (Joseph S. D. Yao)
Subject: Re: tar or cpio?  Tar, of course!

Please amend prior letter.

It is neither UNIXI nor UNII, but Unices.

Thank you.	;-)

	Joe Yao		jsdy@hadron.COM (not yet domainised)
	hadron!jsdy@{seismo.CSS.GOV,dtix.ARPA,decuac.DEC.COM}
{arinc,att,avatar,cos,decuac,dtix,ecogong,kcwc}!hadron!jsdy
     {netex,netxcom,rlgvax,seismo,smsdpg,sundc}!hadron!jsdy

Volume-Number: Volume 11, Number 26