summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-13 15:27:52 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-13 18:47:21 -0800
commit7f8fe36040d84be1e1ed7c8253a9b8c8d902e808 (patch)
tree4589b4c0b5d72c0d71d56051e1eee42b36ae0603
parentb846956c6003136b819cdf1ae001bb652aff1167 (diff)
downloadtar-7f8fe36040d84be1e1ed7c8253a9b8c8d902e808.tar.gz
Don’t recommend delete=mtime
That stops working after the year 2242.
-rw-r--r--doc/tar.texi20
1 files changed, 7 insertions, 13 deletions
diff --git a/doc/tar.texi b/doc/tar.texi
index 64efcebd..2b5747e0 100644
--- a/doc/tar.texi
+++ b/doc/tar.texi
@@ -10578,31 +10578,25 @@ same contents:
@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:
+from them, you will also need to eliminate changes due to ctime:
@smallexample
---pax-option 'delete=[ac]time'
+--pax-option 'delete=atime,delete=ctime'
@end smallexample
-@noindent
Normally @command{tar} saves an mtime value with subsecond resolution
in an extended header for any file with a timestamp that is not on a
one-second boundary. This is in addition to the traditional mtime
-timestamp in the header block, which can represent integer timestamps
-in the 1970-01-01 00:00:00 through 2242-03-16 12:56:31 @sc{utc}. If
-this traditional timestamp suffices and you do not want subsecond
-timestamp resolution, you can use:
-
-@smallexample
---pax-option 'delete=[acm]time'
-@end smallexample
+timestamp in the header block. Although you can suppress subsecond
+timestamp resolution with @option{--pax-option delete=mtime},
+this hack will not work for timestamps before 1970 or after 2242-03-16
+12:56:31 @sc{utc}.
If the environment variable @env{POSIXLY_CORRECT} is set, two POSIX
archives created using the same options on the same set of files might
not be byte-to-byte equivalent even with the above options. This is
because the POSIX default for extended header names includes
-@command{tar}'s process @acronym{ID}, which typically differs at each
+the @command{tar} process @acronym{ID}, which typically differs at each
run. To produce byte-to-byte equivalent archives in this case, either
unset @env{POSIXLY_CORRECT}, or use the following option, which can be
combined with the above options: