tar or cpio?

Rahul Dhesi dhesi at bsu-cs.UUCP
Thu Feb 11 05:06:41 AEST 1988


In article <41499 at sun.uucp> guy at gorodish.Sun.COM (Guy Harris) writes:
>The *correct* thing to do is to make "cpio" detect that the magic number in the
>"cpio" header is byte-swapped from its proper value when reading a tape, and
>automatically decide to swap the bytes in the headers, and *only* the headers,
>as it reads the data.

An even more correct thing to do is for cpio to always write archive headers
in a canonical format that is not dependent on the byte-ordering of the
hardware.  E.g., all header data written least significant byte first.

In other words, portability ought to be achieved by making the cpio *format*
portable, not just by compensating for nonportability in the format (in this
case, ambiguity in byte ordering).

This could well be a matter of religion.  Follow-ups to talk.religion.misc.
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi



More information about the Comp.sys.att mailing list