>Date: Thu, 16 Aug 2007 16:47:39 -0400 >From: Glenn Fowler <gsf at research.att.com> >Subject: Re: CIFS system attributes support for cpio(1), pax(1), tar(1) [PSARC/2007/459 FastTrack timeout 08/17/2007] > >On Thu, 16 Aug 2007 12:17:13 -0700 (PDT) Don Cragun wrote: >> When extracting files from an archive, three ways to specify it would >> be: >> pax -r -s ",^/,," -x cpio < cpio_archive >> pax -r -s "/^\///" -x pax < pax_archive >> pax -r -s "x^/xx" -x ustar < ustar_archive > >one minor nit, > "The archive formats described in the EXTENDED DESCRIPTION > section shall be automatically detected on input." >so the ``-x format'' are not needed -- -x is actually not listed for the -r mode, >at least at http://www.opengroup.org/onlinepubs/009695399/toc.htm >so this would suffice > > pax -r -s ",^/,," < any_archive_the_implementation_groks > >I believe with ``-r -x format'' an implementation may treat input archive >mismatch as an error, but this is not explicitly stated in the standard
Glenn, Yes, you're correct. Allowing -x to be used with -r is an extension to the standard; I believe several implementations verify that the format specified by -x is actually the format found on stdin when both are used, but the standard is completely silent on what happens when both -r and -x are specified on the same command line. > >(this *may* be the only spot in the standard where I have a chance of > knowing something Don doesn't) I'm sure you know a lot more about some sections of the shell than I do as well... Cheers, Don > >-- Glenn Fowler -- AT&T Research, Florham Park NJ --