X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=doc%2Ftar.texi;h=119ae168ed98f352103955fbe0097168352de172;hb=55fb2fc38fbdd9ea39da0ab84ed4748f16ab9b73;hp=e3df0c98b238cfd2326452888048598a91de80ad;hpb=93906c238d9309f95afeddfa9ac8d7ce92351e70;p=chaz%2Ftar diff --git a/doc/tar.texi b/doc/tar.texi index e3df0c9..119ae16 100644 --- a/doc/tar.texi +++ b/doc/tar.texi @@ -4316,6 +4316,10 @@ Disable all warning messages. @subheading Keywords applicable for @command{tar --extract} @table @asis +@kwindex existing-file +@cindex @samp{%s: skipping existing file}, warning message +@item existing-file +@samp{%s: skipping existing file} @kwindex timestamp @cindex @samp{implausibly old time stamp %s}, warning message @cindex @samp{time stamp %s is %s s in the future}, warning message @@ -9813,15 +9817,15 @@ free from many of @samp{v7}'s drawbacks. @subsection Ustar Archive Format @cindex ustar archive format -Archive format defined by @acronym{POSIX}.1-1988 specification is called -@code{ustar}. Although it is more flexible than the V7 format, it +The archive format defined by the @acronym{POSIX}.1-1988 specification is +called @code{ustar}. Although it is more flexible than the V7 format, it still has many restrictions (@pxref{Formats,ustar}, for the detailed description of @code{ustar} format). Along with V7 format, @code{ustar} format is a good choice for archives intended to be read with other implementations of @command{tar}. -To create archive in @code{ustar} format, use @option{--format=ustar} -option in conjunction with the @option{--create} (@option{-c}). +To create an archive in @code{ustar} format, use the @option{--format=ustar} +option in conjunction with @option{--create} (@option{-c}). @node gnu @subsection @acronym{GNU} and old @GNUTAR{} format @@ -9926,7 +9930,8 @@ will use the following default value: This keyword defines the value of the @samp{mtime} field that is written into the ustar header blocks for the extended headers. By default, the @samp{mtime} field is set to the modification time -of the archive member described by that extended headers. +of the archive member described by that extended header (or to the +value of the @option{--mtime} option, if supplied). @item globexthdr.name=@var{string} This keyword allows user control over the name that is written into @@ -10019,23 +10024,39 @@ same contents: --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0 @end smallexample +@noindent +If you extract files from such an archive and recreate the archive +from them, you will also need to eliminate changes due to ctime, as +shown in examples below: + +@smallexample +--pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,ctime:=0 +@end smallexample + +@noindent +or + +@smallexample +--pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,delete=ctime +@end smallexample + @node Checksumming @subsection Checksumming Problems SunOS and HP-UX @command{tar} fail to accept archives created using @GNUTAR{} and containing non-@acronym{ASCII} file names, that -is, file names having characters with the eight bit set, because they +is, file names having characters with the eighth bit set, because they use signed checksums, while @GNUTAR{} uses unsigned checksums while creating archives, as per @acronym{POSIX} standards. On -reading, @GNUTAR{} computes both checksums and -accepts any. It is somewhat worrying that a lot of people may go +reading, @GNUTAR{} computes both checksums and accepts either of them. +It is somewhat worrying that a lot of people may go around doing backup of their files using faulty (or at least non-standard) software, not learning about it until it's time to restore their missing files with an incompatible file extractor, or vice versa. -@GNUTAR{} computes checksums both ways, and accept -any on read, so @acronym{GNU} tar can read Sun tapes even with their +@GNUTAR{} computes checksums both ways, and accepts either of them +on read, so @acronym{GNU} tar can read Sun tapes even with their wrong checksums. @GNUTAR{} produces the standard checksum, however, raising incompatibilities with Sun. That is to say, @GNUTAR{} has not been modified to @@ -10050,7 +10071,7 @@ the default signing of @code{char}'s in their compiler. So they started computing checksums wrongly. When they later realized their mistake, they merely decided to stay compatible with it, and with themselves afterwards. Presumably, but I do not really know, HP-UX -has chosen that their @command{tar} archives to be compatible with Sun's. +has chosen their @command{tar} archives to be compatible with Sun's. The current standards do not favor Sun @command{tar} format. In any case, it now falls on the shoulders of SunOS and HP-UX users to get a @command{tar} able to read the good archives they receive.