tar .vs. cpio

Mike Wescott wescott at ncrcae.UUCP
Sat Aug 11 13:06:10 AEST 1984


There are several reasons why I prefer cpio to tar, the biggest
one being that I used cpio first and got used to its peculiarities
rather than tar.  But prejudice aside:
	1. cpio handles special files (device nodes)
	2. pass option (-p) in combo with find allows me
		to easily move entire subtrees around easily
		(I realize it can be done with a tar-to-tar
		pipeline, but cpio is more straightforeward)
	3. rename option when de-archiving allows greater flexiblity
		in where to put/name things
	4. for archiving, find has -cpio and -ncpio options which
		do not require the pipe

Drawbacks in cpio:
	1. No easy way to override full pathname in the archive
	2. Loses phase easily, bad spot on some records makes rest of
		archive unsalvagable
	3. File extraction does not include the directory and 
		(recursively) everything in it if a directory
		is specified as the file to be extracted, its
		annoying to remember to spec. xyz* to get the
		xyz directory and its contents
	4. To be portable to the v7-based UNIXes I still need
		to use tar

Mike Wescott
NCR Corp.

    mcnc!ncsu!\
	       >ncrcae!wescott
akgua!usceast!/



More information about the Comp.unix mailing list