tar .vs. cpio -- flame!

Henry Spencer henry at utzoo.UUCP
Mon Aug 13 07:41:01 AEST 1984


> ......................................................  Tar comes from
> Berkeley and cpio from Bell (now AT&T)...

Wrong, tar comes from the authors of Unix (the Murray Hill research lab),
while cpio comes from the wonderful people who brought you PWB (retch).

> ..............They grew up to solve different problems.  Tar is a "tape
> archiver" and its major function is to produce backups of filesystems.
> (This was in the days when a filesystem would fit on a single tape.)

Wrong again, both tar and the older tp were for exchanging data on tapes.
Dump and restor are the backup utilities.

> ..... cpio was designed from the ground up to solve a very different
> problem -- selectivly copying lists of files (actually, filesystem elements).
> Thus, it is useful for distributions, or for copying recently-changed files
> for backup, or for copying a selected part of a directory tree somewhere
> else, or .....

These are among the things tar is used for, albeit not as easily as cpio
for some of them.

> Tar takes its list of files from the command line, effectivly
> limiting the number of arguments, while cpio takes them from the standard
> input, giving no such limitation...

Quite true, but it's not hard to add such a facility to tar.  It would
have been very easy to do this, instead of going with an incompatible
format.  (I know that cpio pre-dates tar; that's no excuse for perpetuating
it, though.)

> ....Philosophy.  Cpio is more in keeping with the Unix (tm) philosophy,
> since it seperates the job of SELECTING the files from the job of COPYING
> the files...

See previous comment on the ease of adding this facility to tar.  Actually,
cpio is quite in keeping with the philosophy of the PWB/SysIII/SysV folks,
which is never to adopt an existing program if they can write something else
(incompatible, of course) themselves.  Unix philosophy?  They've never heard
of it!
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix mailing list