]> git.cworth.org Git - tar/blob - doc/tar.info-2
Imported Upstream version 1.22
[tar] / doc / tar.info-2
1 This is tar.info, produced by makeinfo version 4.13 from tar.texi.
2
3 This manual is for GNU `tar' (version 1.22, 5 March 2009), which
4 creates and extracts files from archives.
5
6    Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003,
7 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
8
9      Permission is granted to copy, distribute and/or modify this
10      document under the terms of the GNU Free Documentation License,
11      Version 1.1 or any later version published by the Free Software
12      Foundation; with no Invariant Sections, with the Front-Cover Texts
13      being "A GNU Manual," and with the Back-Cover Texts as in (a)
14      below.  A copy of the license is included in the section entitled
15      "GNU Free Documentation License".
16
17      (a) The FSF's Back-Cover Text is: "You have the freedom to copy
18      and modify this GNU manual.  Buying copies from the FSF supports
19      it in developing GNU and promoting software freedom."
20
21 INFO-DIR-SECTION Archiving
22 START-INFO-DIR-ENTRY
23 * Tar: (tar).                   Making tape (or disk) archives.
24 END-INFO-DIR-ENTRY
25
26 INFO-DIR-SECTION Individual utilities
27 START-INFO-DIR-ENTRY
28 * tar: (tar)tar invocation.                     Invoking GNU `tar'.
29 END-INFO-DIR-ENTRY
30
31 \1f
32 File: tar.info,  Node: gzip,  Next: sparse,  Up: Compression
33
34 8.1.1 Creating and Reading Compressed Archives
35 ----------------------------------------------
36
37 GNU `tar' is able to create and read compressed archives.  It supports
38 `gzip', `bzip2', `lzma' and `lzop' compression programs.  For backward
39 compatibility, it also supports `compress' command, although we
40 strongly recommend against using it, because it is by far less
41 effective than other compression programs(1).
42
43    Creating a compressed archive is simple: you just specify a
44 "compression option" along with the usual archive creation commands.
45 The compression option is `-z' (`--gzip') to create a `gzip' compressed
46 archive, `-j' (`--bzip2') to create a `bzip2' compressed archive, `-J'
47 (`--xz') to create an XZ archive, `--lzma' to create an LZMA compressed
48 archive, `--lzop' to create an LSOP archive, and `-Z' (`--compress') to
49 use `compress' program.  For example:
50
51      $ tar cfz archive.tar.gz .
52
53    You can also let GNU `tar' select the compression program basing on
54 the suffix of the archive file name. This is done using
55 `--auto-compress' (`-a') command line option. For example, the
56 following invocation will use `bzip2' for compression:
57
58      $ tar cfa archive.tar.bz2 .
59
60 whereas the following one will use `lzma':
61
62      $ tar cfa archive.tar.lzma .
63
64    For a complete list of file name suffixes recognized by GNU `tar',
65 *note auto-compress::.
66
67    Reading compressed archive is even simpler: you don't need to specify
68 any additional options as GNU `tar' recognizes its format
69 automatically.  Thus, the following commands will list and extract the
70 archive created in previous example:
71
72      # List the compressed archive
73      $ tar tf archive.tar.gz
74      # Extract the compressed archive
75      $ tar xf archive.tar.gz
76
77    The format recognition algorithm is based on "signatures", a special
78 byte sequences in the beginning of file, that are specific for certain
79 compression formats.  If this approach fails, `tar' falls back to using
80 archive name suffix to determine its format (*Note auto-compress::, for
81 a list of recognized suffixes).
82
83    The only case when you have to specify a decompression option while
84 reading the archive is when reading from a pipe or from a tape drive
85 that does not support random access.  However, in this case GNU `tar'
86 will indicate which option you should use.  For example:
87
88      $ cat archive.tar.gz | tar tf -
89      tar: Archive is compressed.  Use -z option
90      tar: Error is not recoverable: exiting now
91
92    If you see such diagnostics, just add the suggested option to the
93 invocation of GNU `tar':
94
95      $ cat archive.tar.gz | tar tfz -
96
97    Notice also, that there are several restrictions on operations on
98 compressed archives.  First of all, compressed archives cannot be
99 modified, i.e., you cannot update (`--update' (`-u')) them or delete
100 (`--delete') members from them or add (`--append' (`-r')) members to
101 them.  Likewise, you cannot append another `tar' archive to a
102 compressed archive using `--concatenate' (`-A')).  Secondly,
103 multi-volume archives cannot be compressed.
104
105    The following table summarizes compression options used by GNU `tar'.
106
107 `--auto-compress'
108 `-a'
109      Select a compression program to use by the archive file name
110      suffix.  The following suffixes are recognized:
111
112      Suffix               Compression program
113      -------------------------------------------------------------- 
114      `.gz'                `gzip'
115      `.tgz'               `gzip'
116      `.taz'               `gzip'
117      `.Z'                 `compress'
118      `.taZ'               `compress'
119      `.bz2'               `bzip2'
120      `.tz2'               `bzip2'
121      `.tbz2'              `bzip2'
122      `.tbz'               `bzip2'
123      `.lzma'              `lzma'
124      `.tlz'               `lzma'
125      `.lzo'               `lzop'
126      `.xz'                `xz'
127
128 `-z'
129 `--gzip'
130 `--ungzip'
131      Filter the archive through `gzip'.
132
133      You can use `--gzip' and `--gunzip' on physical devices (tape
134      drives, etc.) and remote files as well as on normal files; data to
135      or from such devices or remote files is reblocked by another copy
136      of the `tar' program to enforce the specified (or default) record
137      size.  The default compression parameters are used; if you need to
138      override them, set `GZIP' environment variable, e.g.:
139
140           $ GZIP=--best tar cfz archive.tar.gz subdir
141
142      Another way would be to avoid the `--gzip' (`--gunzip',
143      `--ungzip', `-z') option and run `gzip' explicitly:
144
145           $ tar cf - subdir | gzip --best -c - > archive.tar.gz
146
147      About corrupted compressed archives: `gzip''ed files have no
148      redundancy, for maximum compression.  The adaptive nature of the
149      compression scheme means that the compression tables are implicitly
150      spread all over the archive.  If you lose a few blocks, the dynamic
151      construction of the compression tables becomes unsynchronized, and
152      there is little chance that you could recover later in the archive.
153
154      There are pending suggestions for having a per-volume or per-file
155      compression in GNU `tar'.  This would allow for viewing the
156      contents without decompression, and for resynchronizing
157      decompression at every volume or file, in case of corrupted
158      archives.  Doing so, we might lose some compressibility.  But this
159      would have make recovering easier.  So, there are pros and cons.
160      We'll see!
161
162 `-J'
163 `--xz'
164      Filter the archive through `xz'.  Otherwise like `--gzip'.
165
166 `-j'
167 `--bzip2'
168      Filter the archive through `bzip2'.  Otherwise like `--gzip'.
169
170 `--lzma'
171      Filter the archive through `lzma'.  Otherwise like `--gzip'.
172
173 `--lzop'
174      Filter the archive through `lzop'.  Otherwise like `--gzip'.
175
176 `-Z'
177 `--compress'
178 `--uncompress'
179      Filter the archive through `compress'.  Otherwise like `--gzip'.
180
181 `--use-compress-program=PROG'
182 `-I=PROG'
183      Use external compression program PROG.  Use this option if you
184      have a compression program that GNU `tar' does not support.  There
185      are two requirements to which PROG should comply:
186
187      First, when called without options, it should read data from
188      standard input, compress it and output it on standard output.
189
190      Secondly, if called with `-d' argument, it should do exactly the
191      opposite, i.e., read the compressed data from the standard input
192      and produce uncompressed data on the standard output.
193
194    The `--use-compress-program' option, in particular, lets you
195 implement your own filters, not necessarily dealing with
196 compression/decompression.  For example, suppose you wish to implement
197 PGP encryption on top of compression, using `gpg' (*note gpg:
198 (gpg)Top.).  The following script does that:
199
200      #! /bin/sh
201      case $1 in
202      -d) gpg --decrypt - | gzip -d -c;;
203      '') gzip -c | gpg -s ;;
204      *)  echo "Unknown option $1">&2; exit 1;;
205      esac
206
207    Suppose you name it `gpgz' and save it somewhere in your `PATH'.
208 Then the following command will create a compressed archive signed with
209 your private key:
210
211      $ tar -cf foo.tar.gpgz -Igpgz .
212
213 Likewise, the command below will list its contents:
214
215      $ tar -tf foo.tar.gpgz -Igpgz .
216
217    ---------- Footnotes ----------
218
219    (1) It also had patent problems in the past.
220
221 \1f
222 File: tar.info,  Node: sparse,  Prev: gzip,  Up: Compression
223
224 8.1.2 Archiving Sparse Files
225 ----------------------------
226
227 Files in the file system occasionally have "holes".  A "hole" in a file
228 is a section of the file's contents which was never written.  The
229 contents of a hole reads as all zeros.  On many operating systems,
230 actual disk storage is not allocated for holes, but they are counted in
231 the length of the file.  If you archive such a file, `tar' could create
232 an archive longer than the original.  To have `tar' attempt to
233 recognize the holes in a file, use `--sparse' (`-S').  When you use
234 this option, then, for any file using less disk space than would be
235 expected from its length, `tar' searches the file for consecutive
236 stretches of zeros.  It then records in the archive for the file where
237 the consecutive stretches of zeros are, and only archives the "real
238 contents" of the file.  On extraction (using `--sparse' is not needed
239 on extraction) any such files have holes created wherever the
240 continuous stretches of zeros were found.  Thus, if you use `--sparse',
241 `tar' archives won't take more space than the original.
242
243 `-S'
244 `--sparse'
245      This option instructs `tar' to test each file for sparseness
246      before attempting to archive it.  If the file is found to be
247      sparse it is treated specially, thus allowing to decrease the
248      amount of space used by its image in the archive.
249
250      This option is meaningful only when creating or updating archives.
251      It has no effect on extraction.
252
253    Consider using `--sparse' when performing file system backups, to
254 avoid archiving the expanded forms of files stored sparsely in the
255 system.
256
257    Even if your system has no sparse files currently, some may be
258 created in the future.  If you use `--sparse' while making file system
259 backups as a matter of course, you can be assured the archive will
260 never take more space on the media than the files take on disk
261 (otherwise, archiving a disk filled with sparse files might take
262 hundreds of tapes).  *Note Incremental Dumps::.
263
264    However, be aware that `--sparse' option presents a serious
265 drawback.  Namely, in order to determine if the file is sparse `tar'
266 has to read it before trying to archive it, so in total the file is
267 read *twice*.  So, always bear in mind that the time needed to process
268 all files with this option is roughly twice the time needed to archive
269 them without it.
270
271    When using `POSIX' archive format, GNU `tar' is able to store sparse
272 files using in three distinct ways, called "sparse formats".  A sparse
273 format is identified by its "number", consisting, as usual of two
274 decimal numbers, delimited by a dot.  By default, format `1.0' is used.
275 If, for some reason, you wish to use an earlier format, you can select
276 it using `--sparse-version' option.
277
278 `--sparse-version=VERSION'
279      Select the format to store sparse files in.  Valid VERSION values
280      are: `0.0', `0.1' and `1.0'.  *Note Sparse Formats::, for a
281      detailed description of each format.
282
283    Using `--sparse-format' option implies `--sparse'.
284
285 \1f
286 File: tar.info,  Node: Attributes,  Next: Portability,  Prev: Compression,  Up: Formats
287
288 8.2 Handling File Attributes
289 ============================
290
291      _(This message will disappear, once this node revised.)_
292
293 When `tar' reads files, it updates their access times.  To avoid this,
294 use the `--atime-preserve[=METHOD]' option, which can either reset the
295 access time retroactively or avoid changing it in the first place.
296
297    Handling of file attributes
298
299 `--atime-preserve'
300 `--atime-preserve=replace'
301 `--atime-preserve=system'
302      Preserve the access times of files that are read.  This works only
303      for files that you own, unless you have superuser privileges.
304
305      `--atime-preserve=replace' works on most systems, but it also
306      restores the data modification time and updates the status change
307      time.  Hence it doesn't interact with incremental dumps nicely
308      (*note Incremental Dumps::), and it can set access or data
309      modification times incorrectly if other programs access the file
310      while `tar' is running.
311
312      `--atime-preserve=system' avoids changing the access time in the
313      first place, if the operating system supports this.
314      Unfortunately, this may or may not work on any given operating
315      system or file system.  If `tar' knows for sure it won't work, it
316      complains right away.
317
318      Currently `--atime-preserve' with no operand defaults to
319      `--atime-preserve=replace', but this is intended to change to
320      `--atime-preserve=system' when the latter is better-supported.
321
322 `-m'
323 `--touch'
324      Do not extract data modification time.
325
326      When this option is used, `tar' leaves the data modification times
327      of the files it extracts as the times when the files were
328      extracted, instead of setting it to the times recorded in the
329      archive.
330
331      This option is meaningless with `--list' (`-t').
332
333 `--same-owner'
334      Create extracted files with the same ownership they have in the
335      archive.
336
337      This is the default behavior for the superuser, so this option is
338      meaningful only for non-root users, when `tar' is executed on
339      those systems able to give files away.  This is considered as a
340      security flaw by many people, at least because it makes quite
341      difficult to correctly account users for the disk space they
342      occupy.  Also, the `suid' or `sgid' attributes of files are easily
343      and silently lost when files are given away.
344
345      When writing an archive, `tar' writes the user ID and user name
346      separately.  If it can't find a user name (because the user ID is
347      not in `/etc/passwd'), then it does not write one.  When restoring,
348      it tries to look the name (if one was written) up in
349      `/etc/passwd'.  If it fails, then it uses the user ID stored in
350      the archive instead.
351
352 `--no-same-owner'
353 `-o'
354      Do not attempt to restore ownership when extracting.  This is the
355      default behavior for ordinary users, so this option has an effect
356      only for the superuser.
357
358 `--numeric-owner'
359      The `--numeric-owner' option allows (ANSI) archives to be written
360      without user/group name information or such information to be
361      ignored when extracting.  It effectively disables the generation
362      and/or use of user/group name information.  This option forces
363      extraction using the numeric ids from the archive, ignoring the
364      names.
365
366      This is useful in certain circumstances, when restoring a backup
367      from an emergency floppy with different passwd/group files for
368      example.  It is otherwise impossible to extract files with the
369      right ownerships if the password file in use during the extraction
370      does not match the one belonging to the file system(s) being
371      extracted.  This occurs, for example, if you are restoring your
372      files after a major crash and had booted from an emergency floppy
373      with no password file or put your disk into another machine to do
374      the restore.
375
376      The numeric ids are _always_ saved into `tar' archives.  The
377      identifying names are added at create time when provided by the
378      system, unless `--old-archive' (`-o') is used.  Numeric ids could
379      be used when moving archives between a collection of machines using
380      a centralized management for attribution of numeric ids to users
381      and groups.  This is often made through using the NIS capabilities.
382
383      When making a `tar' file for distribution to other sites, it is
384      sometimes cleaner to use a single owner for all files in the
385      distribution, and nicer to specify the write permission bits of the
386      files as stored in the archive independently of their actual value
387      on the file system.  The way to prepare a clean distribution is
388      usually to have some Makefile rule creating a directory, copying
389      all needed files in that directory, then setting ownership and
390      permissions as wanted (there are a lot of possible schemes), and
391      only then making a `tar' archive out of this directory, before
392      cleaning everything out.  Of course, we could add a lot of options
393      to GNU `tar' for fine tuning permissions and ownership.  This is
394      not the good way, I think.  GNU `tar' is already crowded with
395      options and moreover, the approach just explained gives you a
396      great deal of control already.
397
398 `-p'
399 `--same-permissions'
400 `--preserve-permissions'
401      Extract all protection information.
402
403      This option causes `tar' to set the modes (access permissions) of
404      extracted files exactly as recorded in the archive.  If this option
405      is not used, the current `umask' setting limits the permissions on
406      extracted files.  This option is by default enabled when `tar' is
407      executed by a superuser.
408
409      This option is meaningless with `--list' (`-t').
410
411 `--preserve'
412      Same as both `--same-permissions' and `--same-order'.
413
414      This option is deprecated, and will be removed in GNU `tar'
415      version 1.23.
416
417
418 \1f
419 File: tar.info,  Node: Portability,  Next: cpio,  Prev: Attributes,  Up: Formats
420
421 8.3 Making `tar' Archives More Portable
422 =======================================
423
424 Creating a `tar' archive on a particular system that is meant to be
425 useful later on many other machines and with other versions of `tar' is
426 more challenging than you might think.  `tar' archive formats have been
427 evolving since the first versions of Unix.  Many such formats are
428 around, and are not always compatible with each other.  This section
429 discusses a few problems, and gives some advice about making `tar'
430 archives more portable.
431
432    One golden rule is simplicity.  For example, limit your `tar'
433 archives to contain only regular files and directories, avoiding other
434 kind of special files.  Do not attempt to save sparse files or
435 contiguous files as such.  Let's discuss a few more problems, in turn.
436
437 * Menu:
438
439 * Portable Names::              Portable Names
440 * dereference::                 Symbolic Links
441 * hard links::                  Hard Links
442 * old::                         Old V7 Archives
443 * ustar::                       Ustar Archives
444 * gnu::                         GNU and old GNU format archives.
445 * posix::                       POSIX archives
446 * Checksumming::                Checksumming Problems
447 * Large or Negative Values::    Large files, negative time stamps, etc.
448 * Other Tars::                  How to Extract GNU-Specific Data Using
449                                 Other `tar' Implementations
450
451 \1f
452 File: tar.info,  Node: Portable Names,  Next: dereference,  Up: Portability
453
454 8.3.1 Portable Names
455 --------------------
456
457 Use portable file and member names.  A name is portable if it contains
458 only ASCII letters and digits, `/', `.', `_', and `-'; it cannot be
459 empty, start with `-' or `//', or contain `/-'.  Avoid deep directory
460 nesting.  For portability to old Unix hosts, limit your file name
461 components to 14 characters or less.
462
463    If you intend to have your `tar' archives to be read under MSDOS,
464 you should not rely on case distinction for file names, and you might
465 use the GNU `doschk' program for helping you further diagnosing illegal
466 MSDOS names, which are even more limited than System V's.
467
468 \1f
469 File: tar.info,  Node: dereference,  Next: hard links,  Prev: Portable Names,  Up: Portability
470
471 8.3.2 Symbolic Links
472 --------------------
473
474 Normally, when `tar' archives a symbolic link, it writes a block to the
475 archive naming the target of the link.  In that way, the `tar' archive
476 is a faithful record of the file system contents.  `--dereference'
477 (`-h') is used with `--create' (`-c'), and causes `tar' to archive the
478 files symbolic links point to, instead of the links themselves.  When
479 this option is used, when `tar' encounters a symbolic link, it will
480 archive the linked-to file, instead of simply recording the presence of
481 a symbolic link.
482
483    The name under which the file is stored in the file system is not
484 recorded in the archive.  To record both the symbolic link name and the
485 file name in the system, archive the file under both names.  If all
486 links were recorded automatically by `tar', an extracted file might be
487 linked to a file name that no longer exists in the file system.
488
489    If a linked-to file is encountered again by `tar' while creating the
490 same archive, an entire second copy of it will be stored.  (This
491 _might_ be considered a bug.)
492
493    So, for portable archives, do not archive symbolic links as such,
494 and use `--dereference' (`-h'): many systems do not support symbolic
495 links, and moreover, your distribution might be unusable if it contains
496 unresolved symbolic links.
497
498 \1f
499 File: tar.info,  Node: hard links,  Next: old,  Prev: dereference,  Up: Portability
500
501 8.3.3 Hard Links
502 ----------------
503
504      _(This message will disappear, once this node revised.)_
505
506 Normally, when `tar' archives a hard link, it writes a block to the
507 archive naming the target of the link (a `1' type block).  In that way,
508 the actual file contents is stored in file only once.  For example,
509 consider the following two files:
510
511      $ ls
512      -rw-r--r--   2 gray staff       4 2007-10-30 15:11 one
513      -rw-r--r--   2 gray staff       4 2007-10-30 15:11 jeden
514
515    Here, `jeden' is a link to `one'.  When archiving this directory
516 with a verbose level 2, you will get an output similar to the following:
517
518      $ tar cfvv ../archive.tar .
519      drwxr-xr-x gray/staff        0 2007-10-30 15:13 ./
520      -rw-r--r-- gray/staff        4 2007-10-30 15:11 ./jeden
521      hrw-r--r-- gray/staff        0 2007-10-30 15:11 ./one link to ./jeden
522
523    The last line shows that, instead of storing two copies of the file,
524 `tar' stored it only once, under the name `jeden', and stored file
525 `one' as a hard link to this file.
526
527    It may be important to know that all hard links to the given file are
528 stored in the archive.  For example, this may be necessary for exact
529 reproduction of the file system.  The following option does that:
530
531 `--check-links'
532 `-l'
533      Check the number of links dumped for each processed file.  If this
534      number does not match the total number of hard links for the file,
535      print a warning message.
536
537    For example, trying to archive only file `jeden' with this option
538 produces the following diagnostics:
539
540      $ tar -c -f ../archive.tar jeden
541      tar: Missing links to `jeden'.
542
543    Although creating special records for hard links helps keep a
544 faithful record of the file system contents and makes archives more
545 compact, it may present some difficulties when extracting individual
546 members from the archive.  For example, trying to extract file `one'
547 from the archive created in previous examples produces, in the absense
548 of file `jeden':
549
550      $ tar xf archive.tar ./one
551      tar: ./one: Cannot hard link to `./jeden': No such file or directory
552      tar: Error exit delayed from previous errors
553
554    The reason for this behavior is that `tar' cannot seek back in the
555 archive to the previous member (in this case, `one'), to extract it(1).
556 If you wish to avoid such problems at the cost of a bigger archive, use
557 the following option:
558
559 `--hard-dereference'
560      Dereference hard links and store the files they refer to.
561
562    For example, trying this option on our two sample files, we get two
563 copies in the archive, each of which can then be extracted
564 independently of the other:
565
566      $ tar -c -vv -f ../archive.tar --hard-dereference .
567      drwxr-xr-x gray/staff        0 2007-10-30 15:13 ./
568      -rw-r--r-- gray/staff        4 2007-10-30 15:11 ./jeden
569      -rw-r--r-- gray/staff        4 2007-10-30 15:11 ./one
570
571    ---------- Footnotes ----------
572
573    (1) There are plans to fix this in future releases.
574
575 \1f
576 File: tar.info,  Node: old,  Next: ustar,  Prev: hard links,  Up: Portability
577
578 8.3.4 Old V7 Archives
579 ---------------------
580
581 Certain old versions of `tar' cannot handle additional information
582 recorded by newer `tar' programs.  To create an archive in V7 format
583 (not ANSI), which can be read by these old versions, specify the
584 `--format=v7' option in conjunction with the `--create' (`-c') (`tar'
585 also accepts `--portability' or `--old-archive' for this option).  When
586 you specify it, `tar' leaves out information about directories, pipes,
587 fifos, contiguous files, and device files, and specifies file ownership
588 by group and user IDs instead of group and user names.
589
590    When updating an archive, do not use `--format=v7' unless the
591 archive was created using this option.
592
593    In most cases, a _new_ format archive can be read by an _old_ `tar'
594 program without serious trouble, so this option should seldom be
595 needed.  On the other hand, most modern `tar's are able to read old
596 format archives, so it might be safer for you to always use
597 `--format=v7' for your distributions.  Notice, however, that `ustar'
598 format is a better alternative, as it is free from many of `v7''s
599 drawbacks.
600
601 \1f
602 File: tar.info,  Node: ustar,  Next: gnu,  Prev: old,  Up: Portability
603
604 8.3.5 Ustar Archive Format
605 --------------------------
606
607 Archive format defined by POSIX.1-1988 specification is called `ustar'.
608 Although it is more flexible than the V7 format, it still has many
609 restrictions (*Note ustar: Formats, for the detailed description of
610 `ustar' format).  Along with V7 format, `ustar' format is a good choice
611 for archives intended to be read with other implementations of `tar'.
612
613    To create archive in `ustar' format, use `--format=ustar' option in
614 conjunction with the `--create' (`-c').
615
616 \1f
617 File: tar.info,  Node: gnu,  Next: posix,  Prev: ustar,  Up: Portability
618
619 8.3.6 GNU and old GNU `tar' format
620 ----------------------------------
621
622 GNU `tar' was based on an early draft of the POSIX 1003.1 `ustar'
623 standard.  GNU extensions to `tar', such as the support for file names
624 longer than 100 characters, use portions of the `tar' header record
625 which were specified in that POSIX draft as unused.  Subsequent changes
626 in POSIX have allocated the same parts of the header record for other
627 purposes.  As a result, GNU `tar' format is incompatible with the
628 current POSIX specification, and with `tar' programs that follow it.
629
630    In the majority of cases, `tar' will be configured to create this
631 format by default.  This will change in future releases, since we plan
632 to make `POSIX' format the default.
633
634    To force creation a GNU `tar' archive, use option `--format=gnu'.
635
636 \1f
637 File: tar.info,  Node: posix,  Next: Checksumming,  Prev: gnu,  Up: Portability
638
639 8.3.7 GNU `tar' and POSIX `tar'
640 -------------------------------
641
642 Starting from version 1.14 GNU `tar' features full support for
643 POSIX.1-2001 archives.
644
645    A POSIX conformant archive will be created if `tar' was given
646 `--format=posix' (`--format=pax') option.  No special option is
647 required to read and extract from a POSIX archive.
648
649 * Menu:
650
651 * PAX keywords:: Controlling Extended Header Keywords.
652
653 \1f
654 File: tar.info,  Node: PAX keywords,  Up: posix
655
656 8.3.7.1 Controlling Extended Header Keywords
657 ............................................
658
659 `--pax-option=KEYWORD-LIST'
660      Handle keywords in PAX extended headers.  This option is
661      equivalent to `-o' option of the `pax' utility.
662
663    KEYWORD-LIST is a comma-separated list of keyword options, each
664 keyword option taking one of the following forms:
665
666 `delete=PATTERN'
667      When used with one of archive-creation commands, this option
668      instructs `tar' to omit from extended header records that it
669      produces any keywords matching the string PATTERN.
670
671      When used in extract or list mode, this option instructs tar to
672      ignore any keywords matching the given PATTERN in the extended
673      header records.  In both cases, matching is performed using the
674      pattern matching notation described in POSIX 1003.2, 3.13 (*note
675      wildcards::).  For example:
676
677           --pax-option delete=security.*
678
679      would suppress security-related information.
680
681 `exthdr.name=STRING'
682      This keyword allows user control over the name that is written
683      into the ustar header blocks for the extended headers.  The name
684      is obtained from STRING after making the following substitutions:
685
686      Meta-character    Replaced By
687      -------------------------------------------------------- 
688      %d                The directory name of the file,
689                        equivalent to the result of the
690                        `dirname' utility on the translated
691                        file name.
692      %f                The name of the file with the
693                        directory information stripped,
694                        equivalent to the result of the
695                        `basename' utility on the translated
696                        file name.
697      %p                The process ID of the `tar' process.
698      %%                A `%' character.
699
700      Any other `%' characters in STRING produce undefined results.
701
702      If no option `exthdr.name=string' is specified, `tar' will use the
703      following default value:
704
705           %d/PaxHeaders.%p/%f
706
707 `globexthdr.name=STRING'
708      This keyword allows user control over the name that is written into
709      the ustar header blocks for global extended header records.  The
710      name is obtained from the contents of STRING, after making the
711      following substitutions:
712
713      Meta-character    Replaced By
714      -------------------------------------------------------- 
715      %n                An integer that represents the
716                        sequence number of the global
717                        extended header record in the
718                        archive, starting at 1.
719      %p                The process ID of the `tar' process.
720      %%                A `%' character.
721
722      Any other `%' characters in STRING produce undefined results.
723
724      If no option `globexthdr.name=string' is specified, `tar' will use
725      the following default value:
726
727           $TMPDIR/GlobalHead.%p.%n
728
729      where `$TMPDIR' represents the value of the TMPDIR environment
730      variable.  If TMPDIR is not set, `tar' uses `/tmp'.
731
732 `KEYWORD=VALUE'
733      When used with one of archive-creation commands, these
734      keyword/value pairs will be included at the beginning of the
735      archive in a global extended header record.  When used with one of
736      archive-reading commands, `tar' will behave as if it has
737      encountered these keyword/value pairs at the beginning of the
738      archive in a global extended header record.
739
740 `KEYWORD:=VALUE'
741      When used with one of archive-creation commands, these
742      keyword/value pairs will be included as records at the beginning
743      of an extended header for each file.  This is effectively
744      equivalent to KEYWORD=VALUE form except that it creates no global
745      extended header records.
746
747      When used with one of archive-reading commands, `tar' will behave
748      as if these keyword/value pairs were included as records at the
749      end of each extended header; thus, they will override any global or
750      file-specific extended header record keywords of the same names.
751      For example, in the command:
752
753           tar --format=posix --create \
754               --file archive --pax-option gname:=user .
755
756      the group name will be forced to a new value for all files stored
757      in the archive.
758
759 \1f
760 File: tar.info,  Node: Checksumming,  Next: Large or Negative Values,  Prev: posix,  Up: Portability
761
762 8.3.8 Checksumming Problems
763 ---------------------------
764
765 SunOS and HP-UX `tar' fail to accept archives created using GNU `tar'
766 and containing non-ASCII file names, that is, file names having
767 characters with the eight bit set, because they use signed checksums,
768 while GNU `tar' uses unsigned checksums while creating archives, as per
769 POSIX standards.  On reading, GNU `tar' computes both checksums and
770 accept any.  It is somewhat worrying that a lot of people may go around
771 doing backup of their files using faulty (or at least non-standard)
772 software, not learning about it until it's time to restore their
773 missing files with an incompatible file extractor, or vice versa.
774
775    GNU `tar' compute checksums both ways, and accept any on read, so
776 GNU tar can read Sun tapes even with their wrong checksums.  GNU `tar'
777 produces the standard checksum, however, raising incompatibilities with
778 Sun.  That is to say, GNU `tar' has not been modified to _produce_
779 incorrect archives to be read by buggy `tar''s.  I've been told that
780 more recent Sun `tar' now read standard archives, so maybe Sun did a
781 similar patch, after all?
782
783    The story seems to be that when Sun first imported `tar' sources on
784 their system, they recompiled it without realizing that the checksums
785 were computed differently, because of a change in the default signing
786 of `char''s in their compiler.  So they started computing checksums
787 wrongly.  When they later realized their mistake, they merely decided
788 to stay compatible with it, and with themselves afterwards.
789 Presumably, but I do not really know, HP-UX has chosen that their `tar'
790 archives to be compatible with Sun's.  The current standards do not
791 favor Sun `tar' format.  In any case, it now falls on the shoulders of
792 SunOS and HP-UX users to get a `tar' able to read the good archives
793 they receive.
794
795 \1f
796 File: tar.info,  Node: Large or Negative Values,  Next: Other Tars,  Prev: Checksumming,  Up: Portability
797
798 8.3.9 Large or Negative Values
799 ------------------------------
800
801      _(This message will disappear, once this node revised.)_
802
803 The above sections suggest to use `oldest possible' archive format if
804 in doubt.  However, sometimes it is not possible.  If you attempt to
805 archive a file whose metadata cannot be represented using required
806 format, GNU `tar' will print error message and ignore such a file.  You
807 will than have to switch to a format that is able to handle such
808 values.  The format summary table (*note Formats::) will help you to do
809 so.
810
811    In particular, when trying to archive files larger than 8GB or with
812 timestamps not in the range 1970-01-01 00:00:00 through 2242-03-16
813 12:56:31 UTC, you will have to chose between GNU and POSIX archive
814 formats.  When considering which format to choose, bear in mind that
815 the GNU format uses two's-complement base-256 notation to store values
816 that do not fit into standard ustar range.  Such archives can generally
817 be read only by a GNU `tar' implementation.  Moreover, they sometimes
818 cannot be correctly restored on another hosts even by GNU `tar'.  For
819 example, using two's complement representation for negative time stamps
820 that assumes a signed 32-bit `time_t' generates archives that are not
821 portable to hosts with differing `time_t' representations.
822
823    On the other hand, POSIX archives, generally speaking, can be
824 extracted by any tar implementation that understands older ustar
825 format.  The only exception are files larger than 8GB.
826
827 \1f
828 File: tar.info,  Node: Other Tars,  Prev: Large or Negative Values,  Up: Portability
829
830 8.3.10 How to Extract GNU-Specific Data Using Other `tar' Implementations
831 -------------------------------------------------------------------------
832
833 In previous sections you became acquainted with various quirks
834 necessary to make your archives portable.  Sometimes you may need to
835 extract archives containing GNU-specific members using some third-party
836 `tar' implementation or an older version of GNU `tar'.  Of course your
837 best bet is to have GNU `tar' installed, but if it is for some reason
838 impossible, this section will explain how to cope without it.
839
840    When we speak about "GNU-specific" members we mean two classes of
841 them: members split between the volumes of a multi-volume archive and
842 sparse members.  You will be able to always recover such members if the
843 archive is in PAX format.  In addition split members can be recovered
844 from archives in old GNU format.  The following subsections describe
845 the required procedures in detail.
846
847 * Menu:
848
849 * Split Recovery::       Members Split Between Volumes
850 * Sparse Recovery::      Sparse Members
851
852 \1f
853 File: tar.info,  Node: Split Recovery,  Next: Sparse Recovery,  Up: Other Tars
854
855 8.3.10.1 Extracting Members Split Between Volumes
856 .................................................
857
858 If a member is split between several volumes of an old GNU format
859 archive most third party `tar' implementation will fail to extract it.
860 To extract it, use `tarcat' program (*note Tarcat::).  This program is
861 available from GNU `tar' home page
862 (http://www.gnu.org/software/tar/utils/tarcat.html).  It concatenates
863 several archive volumes into a single valid archive.  For example, if
864 you have three volumes named from `vol-1.tar' to `vol-3.tar', you can
865 do the following to extract them using a third-party `tar':
866
867      $ tarcat vol-1.tar vol-2.tar vol-3.tar | tar xf -
868
869    You could use this approach for most (although not all) PAX format
870 archives as well.  However, extracting split members from a PAX archive
871 is a much easier task, because PAX volumes are constructed in such a
872 way that each part of a split member is extracted to a different file
873 by `tar' implementations that are not aware of GNU extensions.  More
874 specifically, the very first part retains its original name, and all
875 subsequent parts are named using the pattern:
876
877      %d/GNUFileParts.%p/%f.%n
878
879 where symbols preceeded by `%' are "macro characters" that have the
880 following meaning:
881
882 Meta-character     Replaced By
883 ------------------------------------------------------------ 
884 %d                 The directory name of the file,
885                    equivalent to the result of the
886                    `dirname' utility on its full name.
887 %f                 The file name of the file, equivalent
888                    to the result of the `basename' utility
889                    on its full name.
890 %p                 The process ID of the `tar' process that
891                    created the archive.
892 %n                 Ordinal number of this particular part.
893
894    For example, if the file `var/longfile' was split during archive
895 creation between three volumes, and the creator `tar' process had
896 process ID `27962', then the member names will be:
897
898      var/longfile
899      var/GNUFileParts.27962/longfile.1
900      var/GNUFileParts.27962/longfile.2
901
902    When you extract your archive using a third-party `tar', these files
903 will be created on your disk, and the only thing you will need to do to
904 restore your file in its original form is concatenate them in the
905 proper order, for example:
906
907      $ cd var
908      $ cat GNUFileParts.27962/longfile.1 \
909        GNUFileParts.27962/longfile.2 >> longfile
910      $ rm -f GNUFileParts.27962
911
912    Notice, that if the `tar' implementation you use supports PAX format
913 archives, it will probably emit warnings about unknown keywords during
914 extraction.  They will look like this:
915
916      Tar file too small
917      Unknown extended header keyword 'GNU.volume.filename' ignored.
918      Unknown extended header keyword 'GNU.volume.size' ignored.
919      Unknown extended header keyword 'GNU.volume.offset' ignored.
920
921 You can safely ignore these warnings.
922
923    If your `tar' implementation is not PAX-aware, you will get more
924 warnings and more files generated on your disk, e.g.:
925
926      $ tar xf vol-1.tar
927      var/PaxHeaders.27962/longfile: Unknown file type 'x', extracted as
928      normal file
929      Unexpected EOF in archive
930      $ tar xf vol-2.tar
931      tmp/GlobalHead.27962.1: Unknown file type 'g', extracted as normal file
932      GNUFileParts.27962/PaxHeaders.27962/sparsefile.1: Unknown file type
933      'x', extracted as normal file
934
935    Ignore these warnings.  The `PaxHeaders.*' directories created will
936 contain files with "extended header keywords" describing the extracted
937 files.  You can delete them, unless they describe sparse members.  Read
938 further to learn more about them.
939
940 \1f
941 File: tar.info,  Node: Sparse Recovery,  Prev: Split Recovery,  Up: Other Tars
942
943 8.3.10.2 Extracting Sparse Members
944 ..................................
945
946 Any `tar' implementation will be able to extract sparse members from a
947 PAX archive.  However, the extracted files will be "condensed", i.e.,
948 any zero blocks will be removed from them.  When we restore such a
949 condensed file to its original form, by adding zero blocks (or "holes")
950 back to their original locations, we call this process "expanding" a
951 compressed sparse file.
952
953    To expand a file, you will need a simple auxiliary program called
954 `xsparse'.  It is available in source form from GNU `tar' home page
955 (http://www.gnu.org/software/tar/utils/xsparse.html).
956
957    Let's begin with archive members in "sparse format version 1.0"(1),
958 which are the easiest to expand.  The condensed file will contain both
959 file map and file data, so no additional data will be needed to restore
960 it.  If the original file name was `DIR/NAME', then the condensed file
961 will be named `DIR/GNUSparseFile.N/NAME', where N is a decimal
962 number(2).
963
964    To expand a version 1.0 file, run `xsparse' as follows:
965
966      $ xsparse `cond-file'
967
968 where `cond-file' is the name of the condensed file.  The utility will
969 deduce the name for the resulting expanded file using the following
970 algorithm:
971
972   1. If `cond-file' does not contain any directories, `../cond-file'
973      will be used;
974
975   2. If `cond-file' has the form `DIR/T/NAME', where both T and NAME
976      are simple names, with no `/' characters in them, the output file
977      name will be `DIR/NAME'.
978
979   3. Otherwise, if `cond-file' has the form `DIR/NAME', the output file
980      name will be `NAME'.
981
982    In the unlikely case when this algorithm does not suit your needs,
983 you can explicitly specify output file name as a second argument to the
984 command:
985
986      $ xsparse `cond-file' `out-file'
987
988    It is often a good idea to run `xsparse' in "dry run" mode first.
989 In this mode, the command does not actually expand the file, but
990 verbosely lists all actions it would be taking to do so.  The dry run
991 mode is enabled by `-n' command line argument:
992
993      $ xsparse -n /home/gray/GNUSparseFile.6058/sparsefile
994      Reading v.1.0 sparse map
995      Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
996      `/home/gray/sparsefile'
997      Finished dry run
998
999    To actually expand the file, you would run:
1000
1001      $ xsparse /home/gray/GNUSparseFile.6058/sparsefile
1002
1003 The program behaves the same way all UNIX utilities do: it will keep
1004 quiet unless it has simething important to tell you (e.g. an error
1005 condition or something).  If you wish it to produce verbose output,
1006 similar to that from the dry run mode, use `-v' option:
1007
1008      $ xsparse -v /home/gray/GNUSparseFile.6058/sparsefile
1009      Reading v.1.0 sparse map
1010      Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1011      `/home/gray/sparsefile'
1012      Done
1013
1014    Additionally, if your `tar' implementation has extracted the
1015 "extended headers" for this file, you can instruct `xstar' to use them
1016 in order to verify the integrity of the expanded file.  The option `-x'
1017 sets the name of the extended header file to use.  Continuing our
1018 example:
1019
1020      $ xsparse -v -x /home/gray/PaxHeaders.6058/sparsefile \
1021        /home/gray/GNUSparseFile.6058/sparsefile
1022      Reading extended header file
1023      Found variable GNU.sparse.major = 1
1024      Found variable GNU.sparse.minor = 0
1025      Found variable GNU.sparse.name = sparsefile
1026      Found variable GNU.sparse.realsize = 217481216
1027      Reading v.1.0 sparse map
1028      Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1029      `/home/gray/sparsefile'
1030      Done
1031
1032    An "extended header" is a special `tar' archive header that precedes
1033 an archive member and contains a set of "variables", describing the
1034 member properties that cannot be stored in the standard `ustar' header.
1035 While optional for expanding sparse version 1.0 members, the use of
1036 extended headers is mandatory when expanding sparse members in older
1037 sparse formats: v.0.0 and v.0.1 (The sparse formats are described in
1038 detail in *note Sparse Formats::.)  So, for these formats, the question
1039 is: how to obtain extended headers from the archive?
1040
1041    If you use a `tar' implementation that does not support PAX format,
1042 extended headers for each member will be extracted as a separate file.
1043 If we represent the member name as `DIR/NAME', then the extended header
1044 file will be named `DIR/PaxHeaders.N/NAME', where N is an integer
1045 number.
1046
1047    Things become more difficult if your `tar' implementation does
1048 support PAX headers, because in this case you will have to manually
1049 extract the headers.  We recommend the following algorithm:
1050
1051   1. Consult the documentation of your `tar' implementation for an
1052      option that prints "block numbers" along with the archive listing
1053      (analogous to GNU `tar''s `-R' option).  For example, `star' has
1054      `-block-number'.
1055
1056   2. Obtain verbose listing using the `block number' option, and find
1057      block numbers of the sparse member in question and the member
1058      immediately following it.  For example, running `star' on our
1059      archive we obtain:
1060
1061           $ star -t -v -block-number -f arc.tar
1062           ...
1063           star: Unknown extended header keyword 'GNU.sparse.size' ignored.
1064           star: Unknown extended header keyword 'GNU.sparse.numblocks' ignored.
1065           star: Unknown extended header keyword 'GNU.sparse.name' ignored.
1066           star: Unknown extended header keyword 'GNU.sparse.map' ignored.
1067           block        56:  425984 -rw-r--r--  gray/users Jun 25 14:46 2006 GNUSparseFile.28124/sparsefile
1068           block       897:   65391 -rw-r--r--  gray/users Jun 24 20:06 2006 README
1069           ...
1070
1071      (as usual, ignore the warnings about unknown keywords.)
1072
1073   3. Let SIZE be the size of the sparse member, BS be its block number
1074      and BN be the block number of the next member.  Compute:
1075
1076           N = BS - BN - SIZE/512 - 2
1077
1078      This number gives the size of the extended header part in tar
1079      "blocks".  In our example, this formula gives: `897 - 56 - 425984
1080      / 512 - 2 = 7'.
1081
1082   4. Use `dd' to extract the headers:
1083
1084           dd if=ARCHIVE of=HNAME bs=512 skip=BS count=N
1085
1086      where ARCHIVE is the archive name, HNAME is a name of the file to
1087      store the extended header in, BS and N are computed in previous
1088      steps.
1089
1090      In our example, this command will be
1091
1092           $ dd if=arc.tar of=xhdr bs=512 skip=56 count=7
1093
1094    Finally, you can expand the condensed file, using the obtained
1095 header:
1096
1097      $ xsparse -v -x xhdr GNUSparseFile.6058/sparsefile
1098      Reading extended header file
1099      Found variable GNU.sparse.size = 217481216
1100      Found variable GNU.sparse.numblocks = 208
1101      Found variable GNU.sparse.name = sparsefile
1102      Found variable GNU.sparse.map = 0,2048,1050624,2048,...
1103      Expanding file `GNUSparseFile.28124/sparsefile' to `sparsefile'
1104      Done
1105
1106    ---------- Footnotes ----------
1107
1108    (1) *Note PAX 1::.
1109
1110    (2) technically speaking, N is a "process ID" of the `tar' process
1111 which created the archive (*note PAX keywords::).
1112
1113 \1f
1114 File: tar.info,  Node: cpio,  Prev: Portability,  Up: Formats
1115
1116 8.4 Comparison of `tar' and `cpio'
1117 ==================================
1118
1119      _(This message will disappear, once this node revised.)_
1120
1121 The `cpio' archive formats, like `tar', do have maximum file name
1122 lengths.  The binary and old ASCII formats have a maximum file length
1123 of 256, and the new ASCII and CRC ASCII formats have a max file length
1124 of 1024.  GNU `cpio' can read and write archives with arbitrary file
1125 name lengths, but other `cpio' implementations may crash unexplainedly
1126 trying to read them.
1127
1128    `tar' handles symbolic links in the form in which it comes in BSD;
1129 `cpio' doesn't handle symbolic links in the form in which it comes in
1130 System V prior to SVR4, and some vendors may have added symlinks to
1131 their system without enhancing `cpio' to know about them.  Others may
1132 have enhanced it in a way other than the way I did it at Sun, and which
1133 was adopted by AT&T (and which is, I think, also present in the `cpio'
1134 that Berkeley picked up from AT&T and put into a later BSD release--I
1135 think I gave them my changes).
1136
1137    (SVR4 does some funny stuff with `tar'; basically, its `cpio' can
1138 handle `tar' format input, and write it on output, and it probably
1139 handles symbolic links.  They may not have bothered doing anything to
1140 enhance `tar' as a result.)
1141
1142    `cpio' handles special files; traditional `tar' doesn't.
1143
1144    `tar' comes with V7, System III, System V, and BSD source; `cpio'
1145 comes only with System III, System V, and later BSD (4.3-tahoe and
1146 later).
1147
1148    `tar''s way of handling multiple hard links to a file can handle
1149 file systems that support 32-bit inumbers (e.g., the BSD file system);
1150 `cpio's way requires you to play some games (in its "binary" format,
1151 i-numbers are only 16 bits, and in its "portable ASCII" format, they're
1152 18 bits--it would have to play games with the "file system ID" field of
1153 the header to make sure that the file system ID/i-number pairs of
1154 different files were always different), and I don't know which `cpio's,
1155 if any, play those games.  Those that don't might get confused and
1156 think two files are the same file when they're not, and make hard links
1157 between them.
1158
1159    `tar's way of handling multiple hard links to a file places only one
1160 copy of the link on the tape, but the name attached to that copy is the
1161 _only_ one you can use to retrieve the file; `cpio's way puts one copy
1162 for every link, but you can retrieve it using any of the names.
1163
1164      What type of check sum (if any) is used, and how is this
1165      calculated.
1166
1167    See the attached manual pages for `tar' and `cpio' format.  `tar'
1168 uses a checksum which is the sum of all the bytes in the `tar' header
1169 for a file; `cpio' uses no checksum.
1170
1171      If anyone knows why `cpio' was made when `tar' was present at the
1172      unix scene,
1173
1174    It wasn't.  `cpio' first showed up in PWB/UNIX 1.0; no
1175 generally-available version of UNIX had `tar' at the time.  I don't
1176 know whether any version that was generally available _within AT&T_ had
1177 `tar', or, if so, whether the people within AT&T who did `cpio' knew
1178 about it.
1179
1180    On restore, if there is a corruption on a tape `tar' will stop at
1181 that point, while `cpio' will skip over it and try to restore the rest
1182 of the files.
1183
1184    The main difference is just in the command syntax and header format.
1185
1186    `tar' is a little more tape-oriented in that everything is blocked
1187 to start on a record boundary.
1188
1189      Is there any differences between the ability to recover crashed
1190      archives between the two of them.  (Is there any chance of
1191      recovering crashed archives at all.)
1192
1193    Theoretically it should be easier under `tar' since the blocking
1194 lets you find a header with some variation of `dd skip=NN'.  However,
1195 modern `cpio''s and variations have an option to just search for the
1196 next file header after an error with a reasonable chance of resyncing.
1197 However, lots of tape driver software won't allow you to continue past
1198 a media error which should be the only reason for getting out of sync
1199 unless a file changed sizes while you were writing the archive.
1200
1201      If anyone knows why `cpio' was made when `tar' was present at the
1202      unix scene, please tell me about this too.
1203
1204    Probably because it is more media efficient (by not blocking
1205 everything and using only the space needed for the headers where `tar'
1206 always uses 512 bytes per file header) and it knows how to archive
1207 special files.
1208
1209    You might want to look at the freely available alternatives.  The
1210 major ones are `afio', GNU `tar', and `pax', each of which have their
1211 own extensions with some backwards compatibility.
1212
1213    Sparse files were `tar'red as sparse files (which you can easily
1214 test, because the resulting archive gets smaller, and GNU `cpio' can no
1215 longer read it).
1216
1217 \1f
1218 File: tar.info,  Node: Media,  Next: Changes,  Prev: Formats,  Up: Top
1219
1220 9 Tapes and Other Archive Media
1221 *******************************
1222
1223      _(This message will disappear, once this node revised.)_
1224
1225 A few special cases about tape handling warrant more detailed
1226 description.  These special cases are discussed below.
1227
1228    Many complexities surround the use of `tar' on tape drives.  Since
1229 the creation and manipulation of archives located on magnetic tape was
1230 the original purpose of `tar', it contains many features making such
1231 manipulation easier.
1232
1233    Archives are usually written on dismountable media--tape cartridges,
1234 mag tapes, or floppy disks.
1235
1236    The amount of data a tape or disk holds depends not only on its size,
1237 but also on how it is formatted.  A 2400 foot long reel of mag tape
1238 holds 40 megabytes of data when formatted at 1600 bits per inch.  The
1239 physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
1240
1241    Magnetic media are re-usable--once the archive on a tape is no longer
1242 needed, the archive can be erased and the tape or disk used over.
1243 Media quality does deteriorate with use, however.  Most tapes or disks
1244 should be discarded when they begin to produce data errors.  EXABYTE
1245 tape cartridges should be discarded when they generate an "error count"
1246 (number of non-usable bits) of more than 10k.
1247
1248    Magnetic media are written and erased using magnetic fields, and
1249 should be protected from such fields to avoid damage to stored data.
1250 Sticking a floppy disk to a filing cabinet using a magnet is probably
1251 not a good idea.
1252
1253 * Menu:
1254
1255 * Device::                      Device selection and switching
1256 * Remote Tape Server::
1257 * Common Problems and Solutions::
1258 * Blocking::                    Blocking
1259 * Many::                        Many archives on one tape
1260 * Using Multiple Tapes::        Using Multiple Tapes
1261 * label::                       Including a Label in the Archive
1262 * verify::
1263 * Write Protection::
1264
1265 \1f
1266 File: tar.info,  Node: Device,  Next: Remote Tape Server,  Up: Media
1267
1268 9.1 Device Selection and Switching
1269 ==================================
1270
1271      _(This message will disappear, once this node revised.)_
1272
1273 `-f [HOSTNAME:]FILE'
1274 `--file=[HOSTNAME:]FILE'
1275      Use archive file or device FILE on HOSTNAME.
1276
1277    This option is used to specify the file name of the archive `tar'
1278 works on.
1279
1280    If the file name is `-', `tar' reads the archive from standard input
1281 (when listing or extracting), or writes it to standard output (when
1282 creating).  If the `-' file name is given when updating an archive,
1283 `tar' will read the original archive from its standard input, and will
1284 write the entire new archive to its standard output.
1285
1286    If the file name contains a `:', it is interpreted as `hostname:file
1287 name'.  If the HOSTNAME contains an "at" sign (`@'), it is treated as
1288 `user@hostname:file name'.  In either case, `tar' will invoke the
1289 command `rsh' (or `remsh') to start up an `/usr/libexec/rmt' on the
1290 remote machine.  If you give an alternate login name, it will be given
1291 to the `rsh'.  Naturally, the remote machine must have an executable
1292 `/usr/libexec/rmt'.  This program is free software from the University
1293 of California, and a copy of the source code can be found with the
1294 sources for `tar'; it's compiled and installed by default.  The exact
1295 path to this utility is determined when configuring the package.  It is
1296 `PREFIX/libexec/rmt', where PREFIX stands for your installation prefix.
1297 This location may also be overridden at runtime by using
1298 `rmt-command=COMMAND' option (*Note --rmt-command: Option Summary, for
1299 detailed description of this option.  *Note Remote Tape Server::, for
1300 the description of `rmt' command).
1301
1302    If this option is not given, but the environment variable `TAPE' is
1303 set, its value is used; otherwise, old versions of `tar' used a default
1304 archive name (which was picked when `tar' was compiled).  The default
1305 is normally set up to be the "first" tape drive or other transportable
1306 I/O medium on the system.
1307
1308    Starting with version 1.11.5, GNU `tar' uses standard input and
1309 standard output as the default device, and I will not try anymore
1310 supporting automatic device detection at installation time.  This was
1311 failing really in too many cases, it was hopeless.  This is now
1312 completely left to the installer to override standard input and
1313 standard output for default device, if this seems preferable.  Further,
1314 I think _most_ actual usages of `tar' are done with pipes or disks, not
1315 really tapes, cartridges or diskettes.
1316
1317    Some users think that using standard input and output is running
1318 after trouble.  This could lead to a nasty surprise on your screen if
1319 you forget to specify an output file name--especially if you are going
1320 through a network or terminal server capable of buffering large amounts
1321 of output.  We had so many bug reports in that area of configuring
1322 default tapes automatically, and so many contradicting requests, that
1323 we finally consider the problem to be portably intractable.  We could
1324 of course use something like `/dev/tape' as a default, but this is
1325 _also_ running after various kind of trouble, going from hung processes
1326 to accidental destruction of real tapes.  After having seen all this
1327 mess, using standard input and output as a default really sounds like
1328 the only clean choice left, and a very useful one too.
1329
1330    GNU `tar' reads and writes archive in records, I suspect this is the
1331 main reason why block devices are preferred over character devices.
1332 Most probably, block devices are more efficient too.  The installer
1333 could also check for `DEFTAPE' in `<sys/mtio.h>'.
1334
1335 `--force-local'
1336      Archive file is local even if it contains a colon.
1337
1338 `--rsh-command=COMMAND'
1339      Use remote COMMAND instead of `rsh'.  This option exists so that
1340      people who use something other than the standard `rsh' (e.g., a
1341      Kerberized `rsh') can access a remote device.
1342
1343      When this command is not used, the shell command found when the
1344      `tar' program was installed is used instead.  This is the first
1345      found of `/usr/ucb/rsh', `/usr/bin/remsh', `/usr/bin/rsh',
1346      `/usr/bsd/rsh' or `/usr/bin/nsh'.  The installer may have
1347      overridden this by defining the environment variable `RSH' _at
1348      installation time_.
1349
1350 `-[0-7][lmh]'
1351      Specify drive and density.
1352
1353 `-M'
1354 `--multi-volume'
1355      Create/list/extract multi-volume archive.
1356
1357      This option causes `tar' to write a "multi-volume" archive--one
1358      that may be larger than will fit on the medium used to hold it.
1359      *Note Multi-Volume Archives::.
1360
1361 `-L NUM'
1362 `--tape-length=NUM'
1363      Change tape after writing NUM x 1024 bytes.
1364
1365      This option might be useful when your tape drivers do not properly
1366      detect end of physical tapes.  By being slightly conservative on
1367      the maximum tape length, you might avoid the problem entirely.
1368
1369 `-F FILE'
1370 `--info-script=FILE'
1371 `--new-volume-script=FILE'
1372      Execute `file' at end of each tape.  This implies `--multi-volume'
1373      (`-M').  *Note info-script::, for a detailed description of this
1374      option.
1375
1376 \1f
1377 File: tar.info,  Node: Remote Tape Server,  Next: Common Problems and Solutions,  Prev: Device,  Up: Media
1378
1379 9.2 The Remote Tape Server
1380 ==========================
1381
1382 In order to access the tape drive on a remote machine, `tar' uses the
1383 remote tape server written at the University of California at Berkeley.
1384 The remote tape server must be installed as `PREFIX/libexec/rmt' on any
1385 machine whose tape drive you want to use.  `tar' calls `rmt' by running
1386 an `rsh' or `remsh' to the remote machine, optionally using a different
1387 login name if one is supplied.
1388
1389    A copy of the source for the remote tape server is provided.  It is
1390 Copyright (C) 1983 by the Regents of the University of California, but
1391 can be freely distributed.  It is compiled and installed by default.
1392
1393    Unless you use the `--absolute-names' (`-P') option, GNU `tar' will
1394 not allow you to create an archive that contains absolute file names (a
1395 file name beginning with `/'.) If you try, `tar' will automatically
1396 remove the leading `/' from the file names it stores in the archive.
1397 It will also type a warning message telling you what it is doing.
1398
1399    When reading an archive that was created with a different `tar'
1400 program, GNU `tar' automatically extracts entries in the archive which
1401 have absolute file names as if the file names were not absolute.  This
1402 is an important feature.  A visitor here once gave a `tar' tape to an
1403 operator to restore; the operator used Sun `tar' instead of GNU `tar',
1404 and the result was that it replaced large portions of our `/bin' and
1405 friends with versions from the tape; needless to say, we were unhappy
1406 about having to recover the file system from backup tapes.
1407
1408    For example, if the archive contained a file `/usr/bin/computoy',
1409 GNU `tar' would extract the file to `usr/bin/computoy', relative to the
1410 current directory.  If you want to extract the files in an archive to
1411 the same absolute names that they had when the archive was created, you
1412 should do a `cd /' before extracting the files from the archive, or you
1413 should either use the `--absolute-names' option, or use the command
1414 `tar -C / ...'.
1415
1416    Some versions of Unix (Ultrix 3.1 is known to have this problem),
1417 can claim that a short write near the end of a tape succeeded, when it
1418 actually failed.  This will result in the -M option not working
1419 correctly.  The best workaround at the moment is to use a significantly
1420 larger blocking factor than the default 20.
1421
1422    In order to update an archive, `tar' must be able to backspace the
1423 archive in order to reread or rewrite a record that was just read (or
1424 written).  This is currently possible only on two kinds of files: normal
1425 disk files (or any other file that can be backspaced with `lseek'), and
1426 industry-standard 9-track magnetic tape (or any other kind of tape that
1427 can be backspaced with the `MTIOCTOP' `ioctl'.
1428
1429    This means that the `--append', `--concatenate', and `--delete'
1430 commands will not work on any other kind of file.  Some media simply
1431 cannot be backspaced, which means these commands and options will never
1432 be able to work on them.  These non-backspacing media include pipes and
1433 cartridge tape drives.
1434
1435    Some other media can be backspaced, and `tar' will work on them once
1436 `tar' is modified to do so.
1437
1438    Archives created with the `--multi-volume', `--label', and
1439 `--incremental' (`-G') options may not be readable by other version of
1440 `tar'.  In particular, restoring a file that was split over a volume
1441 boundary will require some careful work with `dd', if it can be done at
1442 all.  Other versions of `tar' may also create an empty file whose name
1443 is that of the volume header.  Some versions of `tar' may create normal
1444 files instead of directories archived with the `--incremental' (`-G')
1445 option.
1446
1447 \1f
1448 File: tar.info,  Node: Common Problems and Solutions,  Next: Blocking,  Prev: Remote Tape Server,  Up: Media
1449
1450 9.3 Some Common Problems and their Solutions
1451 ============================================
1452
1453 errors from system:
1454 permission denied
1455 no such file or directory
1456 not owner
1457
1458 errors from `tar':
1459 directory checksum error
1460 header format error
1461
1462 errors from media/system:
1463 i/o error
1464 device busy
1465
1466 \1f
1467 File: tar.info,  Node: Blocking,  Next: Many,  Prev: Common Problems and Solutions,  Up: Media
1468
1469 9.4 Blocking
1470 ============
1471
1472      _(This message will disappear, once this node revised.)_
1473
1474 "Block" and "record" terminology is rather confused, and it is also
1475 confusing to the expert reader.  On the other hand, readers who are new
1476 to the field have a fresh mind, and they may safely skip the next two
1477 paragraphs, as the remainder of this manual uses those two terms in a
1478 quite consistent way.
1479
1480    John Gilmore, the writer of the public domain `tar' from which GNU
1481 `tar' was originally derived, wrote (June 1995):
1482
1483      The nomenclature of tape drives comes from IBM, where I believe
1484      they were invented for the IBM 650 or so.  On IBM mainframes, what
1485      is recorded on tape are tape blocks.  The logical organization of
1486      data is into records.  There are various ways of putting records
1487      into blocks, including `F' (fixed sized records), `V' (variable
1488      sized records), `FB' (fixed blocked: fixed size records, N to a
1489      block), `VB' (variable size records, N to a block), `VSB'
1490      (variable spanned blocked: variable sized records that can occupy
1491      more than one block), etc.  The `JCL' `DD RECFORM=' parameter
1492      specified this to the operating system.
1493
1494      The Unix man page on `tar' was totally confused about this.  When
1495      I wrote `PD TAR', I used the historically correct terminology
1496      (`tar' writes data records, which are grouped into blocks).  It
1497      appears that the bogus terminology made it into POSIX (no surprise
1498      here), and now Franc,ois has migrated that terminology back into
1499      the source code too.
1500
1501    The term "physical block" means the basic transfer chunk from or to
1502 a device, after which reading or writing may stop without anything
1503 being lost.  In this manual, the term "block" usually refers to a disk
1504 physical block, _assuming_ that each disk block is 512 bytes in length.
1505 It is true that some disk devices have different physical blocks, but
1506 `tar' ignore these differences in its own format, which is meant to be
1507 portable, so a `tar' block is always 512 bytes in length, and "block"
1508 always mean a `tar' block.  The term "logical block" often represents
1509 the basic chunk of allocation of many disk blocks as a single entity,
1510 which the operating system treats somewhat atomically; this concept is
1511 only barely used in GNU `tar'.
1512
1513    The term "physical record" is another way to speak of a physical
1514 block, those two terms are somewhat interchangeable.  In this manual,
1515 the term "record" usually refers to a tape physical block, _assuming_
1516 that the `tar' archive is kept on magnetic tape.  It is true that
1517 archives may be put on disk or used with pipes, but nevertheless, `tar'
1518 tries to read and write the archive one "record" at a time, whatever
1519 the medium in use.  One record is made up of an integral number of
1520 blocks, and this operation of putting many disk blocks into a single
1521 tape block is called "reblocking", or more simply, "blocking".  The
1522 term "logical record" refers to the logical organization of many
1523 characters into something meaningful to the application.  The term
1524 "unit record" describes a small set of characters which are transmitted
1525 whole to or by the application, and often refers to a line of text.
1526 Those two last terms are unrelated to what we call a "record" in GNU
1527 `tar'.
1528
1529    When writing to tapes, `tar' writes the contents of the archive in
1530 chunks known as "records".  To change the default blocking factor, use
1531 the `--blocking-factor=512-SIZE' (`-b 512-SIZE') option.  Each record
1532 will then be composed of 512-SIZE blocks.  (Each `tar' block is 512
1533 bytes.  *Note Standard::.)  Each file written to the archive uses at
1534 least one full record.  As a result, using a larger record size can
1535 result in more wasted space for small files.  On the other hand, a
1536 larger record size can often be read and written much more efficiently.
1537
1538    Further complicating the problem is that some tape drives ignore the
1539 blocking entirely.  For these, a larger record size can still improve
1540 performance (because the software layers above the tape drive still
1541 honor the blocking), but not as dramatically as on tape drives that
1542 honor blocking.
1543
1544    When reading an archive, `tar' can usually figure out the record
1545 size on itself.  When this is the case, and a non-standard record size
1546 was used when the archive was created, `tar' will print a message about
1547 a non-standard blocking factor, and then operate normally.  On some
1548 tape devices, however, `tar' cannot figure out the record size itself.
1549 On most of those, you can specify a blocking factor (with
1550 `--blocking-factor') larger than the actual blocking factor, and then
1551 use the `--read-full-records' (`-B') option.  (If you specify a
1552 blocking factor with `--blocking-factor' and don't use the
1553 `--read-full-records' option, then `tar' will not attempt to figure out
1554 the recording size itself.)  On some devices, you must always specify
1555 the record size exactly with `--blocking-factor' when reading, because
1556 `tar' cannot figure it out.  In any case, use `--list' (`-t') before
1557 doing any extractions to see whether `tar' is reading the archive
1558 correctly.
1559
1560    `tar' blocks are all fixed size (512 bytes), and its scheme for
1561 putting them into records is to put a whole number of them (one or
1562 more) into each record.  `tar' records are all the same size; at the
1563 end of the file there's a block containing all zeros, which is how you
1564 tell that the remainder of the last record(s) are garbage.
1565
1566    In a standard `tar' file (no options), the block size is 512 and the
1567 record size is 10240, for a blocking factor of 20.  What the
1568 `--blocking-factor' option does is sets the blocking factor, changing
1569 the record size while leaving the block size at 512 bytes.  20 was fine
1570 for ancient 800 or 1600 bpi reel-to-reel tape drives; most tape drives
1571 these days prefer much bigger records in order to stream and not waste
1572 tape.  When writing tapes for myself, some tend to use a factor of the
1573 order of 2048, say, giving a record size of around one megabyte.
1574
1575    If you use a blocking factor larger than 20, older `tar' programs
1576 might not be able to read the archive, so we recommend this as a limit
1577 to use in practice.  GNU `tar', however, will support arbitrarily large
1578 record sizes, limited only by the amount of virtual memory or the
1579 physical characteristics of the tape device.
1580
1581 * Menu:
1582
1583 * Format Variations::           Format Variations
1584 * Blocking Factor::             The Blocking Factor of an Archive
1585
1586 \1f
1587 File: tar.info,  Node: Format Variations,  Next: Blocking Factor,  Up: Blocking
1588
1589 9.4.1 Format Variations
1590 -----------------------
1591
1592      _(This message will disappear, once this node revised.)_
1593
1594 Format parameters specify how an archive is written on the archive
1595 media.  The best choice of format parameters will vary depending on the
1596 type and number of files being archived, and on the media used to store
1597 the archive.
1598
1599    To specify format parameters when accessing or creating an archive,
1600 you can use the options described in the following sections.  If you do
1601 not specify any format parameters, `tar' uses default parameters.  You
1602 cannot modify a compressed archive.  If you create an archive with the
1603 `--blocking-factor' option specified (*note Blocking Factor::), you
1604 must specify that blocking-factor when operating on the archive.  *Note
1605 Formats::, for other examples of format parameter considerations.
1606
1607 \1f
1608 File: tar.info,  Node: Blocking Factor,  Prev: Format Variations,  Up: Blocking
1609
1610 9.4.2 The Blocking Factor of an Archive
1611 ---------------------------------------
1612
1613      _(This message will disappear, once this node revised.)_
1614
1615 The data in an archive is grouped into blocks, which are 512 bytes.
1616 Blocks are read and written in whole number multiples called "records".
1617 The number of blocks in a record (i.e., the size of a record in units
1618 of 512 bytes) is called the "blocking factor".  The
1619 `--blocking-factor=512-SIZE' (`-b 512-SIZE') option specifies the
1620 blocking factor of an archive.  The default blocking factor is
1621 typically 20 (i.e., 10240 bytes), but can be specified at installation.
1622 To find out the blocking factor of an existing archive, use `tar --list
1623 --file=ARCHIVE-NAME'.  This may not work on some devices.
1624
1625    Records are separated by gaps, which waste space on the archive
1626 media.  If you are archiving on magnetic tape, using a larger blocking
1627 factor (and therefore larger records) provides faster throughput and
1628 allows you to fit more data on a tape (because there are fewer gaps).
1629 If you are archiving on cartridge, a very large blocking factor (say
1630 126 or more) greatly increases performance.  A smaller blocking factor,
1631 on the other hand, may be useful when archiving small files, to avoid
1632 archiving lots of nulls as `tar' fills out the archive to the end of
1633 the record.  In general, the ideal record size depends on the size of
1634 the inter-record gaps on the tape you are using, and the average size
1635 of the files you are archiving.  *Note create::, for information on
1636 writing archives.
1637
1638    Archives with blocking factors larger than 20 cannot be read by very
1639 old versions of `tar', or by some newer versions of `tar' running on
1640 old machines with small address spaces.  With GNU `tar', the blocking
1641 factor of an archive is limited only by the maximum record size of the
1642 device containing the archive, or by the amount of available virtual
1643 memory.
1644
1645    Also, on some systems, not using adequate blocking factors, as
1646 sometimes imposed by the device drivers, may yield unexpected
1647 diagnostics.  For example, this has been reported:
1648
1649      Cannot write to /dev/dlt: Invalid argument
1650
1651 In such cases, it sometimes happen that the `tar' bundled by the system
1652 is aware of block size idiosyncrasies, while GNU `tar' requires an
1653 explicit specification for the block size, which it cannot guess.  This
1654 yields some people to consider GNU `tar' is misbehaving, because by
1655 comparison, `the bundle `tar' works OK'.  Adding `-b 256', for example,
1656 might resolve the problem.
1657
1658    If you use a non-default blocking factor when you create an archive,
1659 you must specify the same blocking factor when you modify that archive.
1660 Some archive devices will also require you to specify the blocking
1661 factor when reading that archive, however this is not typically the
1662 case.  Usually, you can use `--list' (`-t') without specifying a
1663 blocking factor--`tar' reports a non-default record size and then lists
1664 the archive members as it would normally.  To extract files from an
1665 archive with a non-standard blocking factor (particularly if you're not
1666 sure what the blocking factor is), you can usually use the
1667 `--read-full-records' (`-B') option while specifying a blocking factor
1668 larger then the blocking factor of the archive (i.e., `tar --extract
1669 --read-full-records --blocking-factor=300'.  *Note list::, for more
1670 information on the `--list' (`-t') operation.  *Note Reading::, for a
1671 more detailed explanation of that option.
1672
1673 `--blocking-factor=NUMBER'
1674 `-b NUMBER'
1675      Specifies the blocking factor of an archive.  Can be used with any
1676      operation, but is usually not necessary with `--list' (`-t').
1677
1678    Device blocking
1679
1680 `-b BLOCKS'
1681 `--blocking-factor=BLOCKS'
1682      Set record size to BLOCKS * 512 bytes.
1683
1684      This option is used to specify a "blocking factor" for the archive.
1685      When reading or writing the archive, `tar', will do reads and
1686      writes of the archive in records of BLOCK*512 bytes.  This is true
1687      even when the archive is compressed.  Some devices requires that
1688      all write operations be a multiple of a certain size, and so, `tar'
1689      pads the archive out to the next record boundary.
1690
1691      The default blocking factor is set when `tar' is compiled, and is
1692      typically 20.  Blocking factors larger than 20 cannot be read by
1693      very old versions of `tar', or by some newer versions of `tar'
1694      running on old machines with small address spaces.
1695
1696      With a magnetic tape, larger records give faster throughput and fit
1697      more data on a tape (because there are fewer inter-record gaps).
1698      If the archive is in a disk file or a pipe, you may want to specify
1699      a smaller blocking factor, since a large one will result in a large
1700      number of null bytes at the end of the archive.
1701
1702      When writing cartridge or other streaming tapes, a much larger
1703      blocking factor (say 126 or more) will greatly increase
1704      performance.  However, you must specify the same blocking factor
1705      when reading or updating the archive.
1706
1707      Apparently, Exabyte drives have a physical block size of 8K bytes.
1708      If we choose our blocksize as a multiple of 8k bytes, then the
1709      problem seems to disappear.  Id est, we are using block size of
1710      112 right now, and we haven't had the problem since we switched...
1711
1712      With GNU `tar' the blocking factor is limited only by the maximum
1713      record size of the device containing the archive, or by the amount
1714      of available virtual memory.
1715
1716      However, deblocking or reblocking is virtually avoided in a special
1717      case which often occurs in practice, but which requires all the
1718      following conditions to be simultaneously true:
1719         * the archive is subject to a compression option,
1720
1721         * the archive is not handled through standard input or output,
1722           nor redirected nor piped,
1723
1724         * the archive is directly handled to a local disk, instead of
1725           any special device,
1726
1727         * `--blocking-factor' is not explicitly specified on the `tar'
1728           invocation.
1729
1730      If the output goes directly to a local disk, and not through
1731      stdout, then the last write is not extended to a full record size.
1732      Otherwise, reblocking occurs.  Here are a few other remarks on this
1733      topic:
1734
1735         * `gzip' will complain about trailing garbage if asked to
1736           uncompress a compressed archive on tape, there is an option
1737           to turn the message off, but it breaks the regularity of
1738           simply having to use `PROG -d' for decompression.  It would
1739           be nice if gzip was silently ignoring any number of trailing
1740           zeros.  I'll ask Jean-loup Gailly, by sending a copy of this
1741           message to him.
1742
1743         * `compress' does not show this problem, but as Jean-loup
1744           pointed out to Michael, `compress -d' silently adds garbage
1745           after the result of decompression, which tar ignores because
1746           it already recognized its end-of-file indicator.  So this bug
1747           may be safely ignored.
1748
1749         * `gzip -d -q' will be silent about the trailing zeros indeed,
1750           but will still return an exit status of 2 which tar reports
1751           in turn.  `tar' might ignore the exit status returned, but I
1752           hate doing that, as it weakens the protection `tar' offers
1753           users against other possible problems at decompression time.
1754           If `gzip' was silently skipping trailing zeros _and_ also
1755           avoiding setting the exit status in this innocuous case, that
1756           would solve this situation.
1757
1758         * `tar' should become more solid at not stopping to read a pipe
1759           at the first null block encountered.  This inelegantly breaks
1760           the pipe.  `tar' should rather drain the pipe out before
1761           exiting itself.
1762
1763 `-i'
1764 `--ignore-zeros'
1765      Ignore blocks of zeros in archive (means EOF).
1766
1767      The `--ignore-zeros' (`-i') option causes `tar' to ignore blocks
1768      of zeros in the archive.  Normally a block of zeros indicates the
1769      end of the archive, but when reading a damaged archive, or one
1770      which was created by concatenating several archives together, this
1771      option allows `tar' to read the entire archive.  This option is
1772      not on by default because many versions of `tar' write garbage
1773      after the zeroed blocks.
1774
1775      Note that this option causes `tar' to read to the end of the
1776      archive file, which may sometimes avoid problems when multiple
1777      files are stored on a single physical tape.
1778
1779 `-B'
1780 `--read-full-records'
1781      Reblock as we read (for reading 4.2BSD pipes).
1782
1783      If `--read-full-records' is used, `tar' will not panic if an
1784      attempt to read a record from the archive does not return a full
1785      record.  Instead, `tar' will keep reading until it has obtained a
1786      full record.
1787
1788      This option is turned on by default when `tar' is reading an
1789      archive from standard input, or from a remote machine.  This is
1790      because on BSD Unix systems, a read of a pipe will return however
1791      much happens to be in the pipe, even if it is less than `tar'
1792      requested.  If this option was not used, `tar' would fail as soon
1793      as it read an incomplete record from the pipe.
1794
1795      This option is also useful with the commands for updating an
1796      archive.
1797
1798
1799    Tape blocking
1800
1801    When handling various tapes or cartridges, you have to take care of
1802 selecting a proper blocking, that is, the number of disk blocks you put
1803 together as a single tape block on the tape, without intervening tape
1804 gaps.  A "tape gap" is a small landing area on the tape with no
1805 information on it, used for decelerating the tape to a full stop, and
1806 for later regaining the reading or writing speed.  When the tape driver
1807 starts reading a record, the record has to be read whole without
1808 stopping, as a tape gap is needed to stop the tape motion without
1809 loosing information.
1810
1811    Using higher blocking (putting more disk blocks per tape block) will
1812 use the tape more efficiently as there will be less tape gaps.  But
1813 reading such tapes may be more difficult for the system, as more memory
1814 will be required to receive at once the whole record.  Further, if
1815 there is a reading error on a huge record, this is less likely that the
1816 system will succeed in recovering the information.  So, blocking should
1817 not be too low, nor it should be too high.  `tar' uses by default a
1818 blocking of 20 for historical reasons, and it does not really matter
1819 when reading or writing to disk.  Current tape technology would easily
1820 accommodate higher blockings.  Sun recommends a blocking of 126 for
1821 Exabytes and 96 for DATs.  We were told that for some DLT drives, the
1822 blocking should be a multiple of 4Kb, preferably 64Kb (`-b 128') or 256
1823 for decent performance.  Other manufacturers may use different
1824 recommendations for the same tapes.  This might also depends of the
1825 buffering techniques used inside modern tape controllers.  Some imposes
1826 a minimum blocking, or a maximum blocking.  Others request blocking to
1827 be some exponent of two.
1828
1829    So, there is no fixed rule for blocking.  But blocking at read time
1830 should ideally be the same as blocking used at write time.  At one place
1831 I know, with a wide variety of equipment, they found it best to use a
1832 blocking of 32 to guarantee that their tapes are fully interchangeable.
1833
1834    I was also told that, for recycled tapes, prior erasure (by the same
1835 drive unit that will be used to create the archives) sometimes lowers
1836 the error rates observed at rewriting time.
1837
1838    I might also use `--number-blocks' instead of `--block-number', so
1839 `--block' will then expand to `--blocking-factor' unambiguously.
1840
1841 \1f
1842 File: tar.info,  Node: Many,  Next: Using Multiple Tapes,  Prev: Blocking,  Up: Media
1843
1844 9.5 Many Archives on One Tape
1845 =============================
1846
1847 Most tape devices have two entries in the `/dev' directory, or entries
1848 that come in pairs, which differ only in the minor number for this
1849 device.  Let's take for example `/dev/tape', which often points to the
1850 only or usual tape device of a given system.  There might be a
1851 corresponding `/dev/nrtape' or `/dev/ntape'.  The simpler name is the
1852 _rewinding_ version of the device, while the name having `nr' in it is
1853 the _no rewinding_ version of the same device.
1854
1855    A rewinding tape device will bring back the tape to its beginning
1856 point automatically when this device is opened or closed.  Since `tar'
1857 opens the archive file before using it and closes it afterwards, this
1858 means that a simple:
1859
1860      $ tar cf /dev/tape DIRECTORY
1861
1862 will reposition the tape to its beginning both prior and after saving
1863 DIRECTORY contents to it, thus erasing prior tape contents and making
1864 it so that any subsequent write operation will destroy what has just
1865 been saved.
1866
1867    So, a rewinding device is normally meant to hold one and only one
1868 file.  If you want to put more than one `tar' archive on a given tape,
1869 you will need to avoid using the rewinding version of the tape device.
1870 You will also have to pay special attention to tape positioning.
1871 Errors in positioning may overwrite the valuable data already on your
1872 tape.  Many people, burnt by past experiences, will only use rewinding
1873 devices and limit themselves to one file per tape, precisely to avoid
1874 the risk of such errors.  Be fully aware that writing at the wrong
1875 position on a tape loses all information past this point and most
1876 probably until the end of the tape, and this destroyed information
1877 _cannot_ be recovered.
1878
1879    To save DIRECTORY-1 as a first archive at the beginning of a tape,
1880 and leave that tape ready for a second archive, you should use:
1881
1882      $ mt -f /dev/nrtape rewind
1883      $ tar cf /dev/nrtape DIRECTORY-1
1884
1885    "Tape marks" are special magnetic patterns written on the tape
1886 media, which are later recognizable by the reading hardware.  These
1887 marks are used after each file, when there are many on a single tape.
1888 An empty file (that is to say, two tape marks in a row) signal the
1889 logical end of the tape, after which no file exist.  Usually,
1890 non-rewinding tape device drivers will react to the close request issued
1891 by `tar' by first writing two tape marks after your archive, and by
1892 backspacing over one of these.  So, if you remove the tape at that time
1893 from the tape drive, it is properly terminated.  But if you write
1894 another file at the current position, the second tape mark will be
1895 erased by the new information, leaving only one tape mark between files.
1896
1897    So, you may now save DIRECTORY-2 as a second archive after the first
1898 on the same tape by issuing the command:
1899
1900      $ tar cf /dev/nrtape DIRECTORY-2
1901
1902 and so on for all the archives you want to put on the same tape.
1903
1904    Another usual case is that you do not write all the archives the same
1905 day, and you need to remove and store the tape between two archive
1906 sessions.  In general, you must remember how many files are already
1907 saved on your tape.  Suppose your tape already has 16 files on it, and
1908 that you are ready to write the 17th.  You have to take care of skipping
1909 the first 16 tape marks before saving DIRECTORY-17, say, by using these
1910 commands:
1911
1912      $ mt -f /dev/nrtape rewind
1913      $ mt -f /dev/nrtape fsf 16
1914      $ tar cf /dev/nrtape DIRECTORY-17
1915
1916    In all the previous examples, we put aside blocking considerations,
1917 but you should do the proper things for that as well.  *Note Blocking::.
1918
1919 * Menu:
1920
1921 * Tape Positioning::            Tape Positions and Tape Marks
1922 * mt::                          The `mt' Utility
1923
1924 \1f
1925 File: tar.info,  Node: Tape Positioning,  Next: mt,  Up: Many
1926
1927 9.5.1 Tape Positions and Tape Marks
1928 -----------------------------------
1929
1930      _(This message will disappear, once this node revised.)_
1931
1932 Just as archives can store more than one file from the file system,
1933 tapes can store more than one archive file.  To keep track of where
1934 archive files (or any other type of file stored on tape) begin and end,
1935 tape archive devices write magnetic "tape marks" on the archive media.
1936 Tape drives write one tape mark between files, two at the end of all
1937 the file entries.
1938
1939    If you think of data as a series of records "rrrr"'s, and tape marks
1940 as "*"'s, a tape might look like the following:
1941
1942      rrrr*rrrrrr*rrrrr*rr*rrrrr**-------------------------
1943
1944    Tape devices read and write tapes using a read/write "tape head"--a
1945 physical part of the device which can only access one point on the tape
1946 at a time.  When you use `tar' to read or write archive data from a
1947 tape device, the device will begin reading or writing from wherever on
1948 the tape the tape head happens to be, regardless of which archive or
1949 what part of the archive the tape head is on.  Before writing an
1950 archive, you should make sure that no data on the tape will be
1951 overwritten (unless it is no longer needed).  Before reading an
1952 archive, you should make sure the tape head is at the beginning of the
1953 archive you want to read.  You can do it manually via `mt' utility
1954 (*note mt::).  The `restore' script does that automatically (*note
1955 Scripted Restoration::).
1956
1957    If you want to add new archive file entries to a tape, you should
1958 advance the tape to the end of the existing file entries, backspace
1959 over the last tape mark, and write the new archive file.  If you were
1960 to add two archives to the example above, the tape might look like the
1961 following:
1962
1963      rrrr*rrrrrr*rrrrr*rr*rrrrr*rrr*rrrr**----------------
1964
1965 \1f
1966 File: tar.info,  Node: mt,  Prev: Tape Positioning,  Up: Many
1967
1968 9.5.2 The `mt' Utility
1969 ----------------------
1970
1971      _(This message will disappear, once this node revised.)_
1972
1973 *Note Blocking Factor::.
1974
1975    You can use the `mt' utility to advance or rewind a tape past a
1976 specified number of archive files on the tape.  This will allow you to
1977 move to the beginning of an archive before extracting or reading it, or
1978 to the end of all the archives before writing a new one.
1979
1980    The syntax of the `mt' command is:
1981
1982      mt [-f TAPENAME] OPERATION [NUMBER]
1983
1984    where TAPENAME is the name of the tape device, NUMBER is the number
1985 of times an operation is performed (with a default of one), and
1986 OPERATION is one of the following:
1987
1988 `eof'
1989 `weof'
1990      Writes NUMBER tape marks at the current position on the tape.
1991
1992 `fsf'
1993      Moves tape position forward NUMBER files.
1994
1995 `bsf'
1996      Moves tape position back NUMBER files.
1997
1998 `rewind'
1999      Rewinds the tape.  (Ignores NUMBER).
2000
2001 `offline'
2002 `rewoff1'
2003      Rewinds the tape and takes the tape device off-line.  (Ignores
2004      NUMBER).
2005
2006 `status'
2007      Prints status information about the tape unit.
2008
2009
2010    If you don't specify a TAPENAME, `mt' uses the environment variable
2011 `TAPE'; if `TAPE' is not set, `mt' will use the default device
2012 specified in your `sys/mtio.h' file (`DEFTAPE' variable).  If this is
2013 not defined, the program will display a descriptive error message and
2014 exit with code 1.
2015
2016    `mt' returns a 0 exit status when the operation(s) were successful,
2017 1 if the command was unrecognized, and 2 if an operation failed.
2018
2019 \1f
2020 File: tar.info,  Node: Using Multiple Tapes,  Next: label,  Prev: Many,  Up: Media
2021
2022 9.6 Using Multiple Tapes
2023 ========================
2024
2025 Often you might want to write a large archive, one larger than will fit
2026 on the actual tape you are using.  In such a case, you can run multiple
2027 `tar' commands, but this can be inconvenient, particularly if you are
2028 using options like `--exclude=PATTERN' or dumping entire file systems.
2029 Therefore, `tar' provides a special mode for creating multi-volume
2030 archives.
2031
2032    "Multi-volume" archive is a single `tar' archive, stored on several
2033 media volumes of fixed size.  Although in this section we will often
2034 call `volume' a "tape", there is absolutely no requirement for
2035 multi-volume archives to be stored on tapes.  Instead, they can use
2036 whatever media type the user finds convenient, they can even be located
2037 on files.
2038
2039    When creating a multi-volume archive, GNU `tar' continues to fill
2040 current volume until it runs out of space, then it switches to next
2041 volume (usually the operator is queried to replace the tape on this
2042 point), and continues working on the new volume.  This operation
2043 continues until all requested files are dumped.  If GNU `tar' detects
2044 end of media while dumping a file, such a file is archived in split
2045 form.  Some very big files can even be split across several volumes.
2046
2047    Each volume is itself a valid GNU `tar' archive, so it can be read
2048 without any special options.  Consequently any file member residing
2049 entirely on one volume can be extracted or otherwise operated upon
2050 without needing the other volume.  Sure enough, to extract a split
2051 member you would need all volumes its parts reside on.
2052
2053    Multi-volume archives suffer from several limitations.  In
2054 particular, they cannot be compressed.
2055
2056    GNU `tar' is able to create multi-volume archives of two formats
2057 (*note Formats::): `GNU' and `POSIX'.
2058
2059 * Menu:
2060
2061 * Multi-Volume Archives::       Archives Longer than One Tape or Disk
2062 * Tape Files::                  Tape Files
2063 * Tarcat::                      Concatenate Volumes into a Single Archive
2064
2065 \1f
2066 File: tar.info,  Node: Multi-Volume Archives,  Next: Tape Files,  Up: Using Multiple Tapes
2067
2068 9.6.1 Archives Longer than One Tape or Disk
2069 -------------------------------------------
2070
2071 To create an archive that is larger than will fit on a single unit of
2072 the media, use the `--multi-volume' (`-M') option in conjunction with
2073 the `--create' option (*note create::).  A "multi-volume" archive can
2074 be manipulated like any other archive (provided the `--multi-volume'
2075 option is specified), but is stored on more than one tape or disk.
2076
2077    When you specify `--multi-volume', `tar' does not report an error
2078 when it comes to the end of an archive volume (when reading), or the
2079 end of the media (when writing).  Instead, it prompts you to load a new
2080 storage volume.  If the archive is on a magnetic tape, you should
2081 change tapes when you see the prompt; if the archive is on a floppy
2082 disk, you should change disks; etc.
2083
2084 `--multi-volume'
2085 `-M'
2086      Creates a multi-volume archive, when used in conjunction with
2087      `--create' (`-c').  To perform any other operation on a
2088      multi-volume archive, specify `--multi-volume' in conjunction with
2089      that operation.  For example:
2090
2091           $ tar --create --multi-volume --file=/dev/tape FILES
2092
2093    The method `tar' uses to detect end of tape is not perfect, and
2094 fails on some operating systems or on some devices.  If `tar' cannot
2095 detect the end of the tape itself, you can use `--tape-length' option
2096 to inform it about the capacity of the tape:
2097
2098 `--tape-length=SIZE'
2099 `-L SIZE'
2100      Set maximum length of a volume.  The SIZE argument should then be
2101      the usable size of the tape in units of 1024 bytes.  This option
2102      selects `--multi-volume' automatically.  For example:
2103
2104           $ tar --create --tape-length=41943040 --file=/dev/tape FILES
2105
2106    When GNU `tar' comes to the end of a storage media, it asks you to
2107 change the volume.  The built-in prompt for POSIX locale is(1):
2108
2109      Prepare volume #N for `ARCHIVE' and hit return:
2110
2111 where N is the ordinal number of the volume to be created and ARCHIVE
2112 is archive file or device name.
2113
2114    When prompting for a new tape, `tar' accepts any of the following
2115 responses:
2116
2117 `?'
2118      Request `tar' to explain possible responses
2119
2120 `q'
2121      Request `tar' to exit immediately.
2122
2123 `n FILE-NAME'
2124      Request `tar' to write the next volume on the file FILE-NAME.
2125
2126 `!'
2127      Request `tar' to run a subshell.  This option can be disabled by
2128      giving `--restrict' command line option to `tar'(2).
2129
2130 `y'
2131      Request `tar' to begin writing the next volume.
2132
2133    (You should only type `y' after you have changed the tape; otherwise
2134 `tar' will write over the volume it just finished.)
2135
2136    The volume number used by `tar' in its tape-changing prompt can be
2137 changed; if you give the `--volno-file=FILE-OF-NUMBER' option, then
2138 FILE-OF-NUMBER should be an non-existing file to be created, or else, a
2139 file already containing a decimal number.  That number will be used as
2140 the volume number of the first volume written.  When `tar' is finished,
2141 it will rewrite the file with the now-current volume number. (This does
2142 not change the volume number written on a tape label, as per *note
2143 label::, it _only_ affects the number used in the prompt.)
2144
2145    If you want more elaborate behavior than this, you can write a
2146 special "new volume script", that will be responsible for changing the
2147 volume, and instruct `tar' to use it instead of its normal prompting
2148 procedure:
2149
2150 `--info-script=SCRIPT-NAME'
2151 `--new-volume-script=SCRIPT-NAME'
2152 `-F SCRIPT-NAME'
2153      Specify the full name of the volume script to use.  The script can
2154      be used to eject cassettes, or to broadcast messages such as
2155      `Someone please come change my tape' when performing unattended
2156      backups.
2157
2158    The SCRIPT-NAME is executed without any command line arguments.  It
2159 inherits `tar''s shell environment.  Additional data is passed to it
2160 via the following environment variables:
2161
2162 `TAR_VERSION'
2163      GNU `tar' version number.
2164
2165 `TAR_ARCHIVE'
2166      The name of the archive `tar' is processing.
2167
2168 `TAR_BLOCKING_FACTOR'
2169      Current blocking factor (*note Blocking::.
2170
2171 `TAR_VOLUME'
2172      Ordinal number of the volume `tar' is about to start.
2173
2174 `TAR_SUBCOMMAND'
2175      A short option describing the operation `tar' is executing *Note
2176      Operations::, for a complete list of subcommand options.
2177
2178 `TAR_FORMAT'
2179      Format of the archive being processed. *Note Formats::, for a
2180      complete list of archive format names.
2181
2182 `TAR_FD'
2183      File descriptor which can be used to communicate the new volume
2184      name to `tar'.
2185
2186    The volume script can instruct `tar' to use new archive name, by
2187 writing in to file descriptor `$TAR_FD' (see below for an example).
2188
2189    If the info script fails, `tar' exits; otherwise, it begins writing
2190 the next volume.
2191
2192    If you want `tar' to cycle through a series of files or tape drives,
2193 there are three approaches to choose from.  First of all, you can give
2194 `tar' multiple `--file' options.  In this case the specified files will
2195 be used, in sequence, as the successive volumes of the archive.  Only
2196 when the first one in the sequence needs to be used again will `tar'
2197 prompt for a tape change (or run the info script).  For example,
2198 suppose someone has two tape drives on a system named `/dev/tape0' and
2199 `/dev/tape1'.  For having GNU `tar' to switch to the second drive when
2200 it needs to write the second tape, and then back to the first tape,
2201 etc., just do either of:
2202
2203      $ tar --create --multi-volume --file=/dev/tape0 --file=/dev/tape1 FILES
2204      $ tar cMff /dev/tape0 /dev/tape1 FILES
2205
2206    The second method is to use the `n' response to the tape-change
2207 prompt.
2208
2209    Finally, the most flexible approach is to use a volume script, that
2210 writes new archive name to the file descriptor `$TAR_FD'.  For example,
2211 the following volume script will create a series of archive files, named
2212 `ARCHIVE-VOL', where ARCHIVE is the name of the archive being created
2213 (as given by `--file' option) and VOL is the ordinal number of the
2214 archive being created:
2215
2216      #! /bin/sh
2217      echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.
2218
2219      name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
2220      case $TAR_SUBCOMMAND in
2221      -c)       ;;
2222      -d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
2223                ;;
2224      *)        exit 1
2225      esac
2226
2227      echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD
2228
2229    The same script can be used while listing, comparing or extracting
2230 from the created archive.  For example:
2231
2232      # Create a multi-volume archive:
2233      $ tar -c -L1024 -f archive.tar -F new-volume .
2234      # Extract from the created archive:
2235      $ tar -x -f archive.tar -F new-volume .
2236
2237 Notice, that the first command had to use `-L' option, since otherwise
2238 GNU `tar' will end up writing everything to file `archive.tar'.
2239
2240    You can read each individual volume of a multi-volume archive as if
2241 it were an archive by itself.  For example, to list the contents of one
2242 volume, use `--list', without `--multi-volume' specified.  To extract
2243 an archive member from one volume (assuming it is described that
2244 volume), use `--extract', again without `--multi-volume'.
2245
2246    If an archive member is split across volumes (i.e., its entry begins
2247 on one volume of the media and ends on another), you need to specify
2248 `--multi-volume' to extract it successfully.  In this case, you should
2249 load the volume where the archive member starts, and use `tar --extract
2250 --multi-volume'--`tar' will prompt for later volumes as it needs them.
2251 *Note extracting archives::, for more information about extracting
2252 archives.
2253
2254    Multi-volume archives can be modified like any other archive.  To add
2255 files to a multi-volume archive, you need to only mount the last volume
2256 of the archive media (and new volumes, if needed).  For all other
2257 operations, you need to use the entire archive.
2258
2259    If a multi-volume archive was labeled using `--label=ARCHIVE-LABEL'
2260 (*note label::) when it was created, `tar' will not automatically label
2261 volumes which are added later.  To label subsequent volumes, specify
2262 `--label=ARCHIVE-LABEL' again in conjunction with the `--append',
2263 `--update' or `--concatenate' operation.
2264
2265    Notice that multi-volume support is a GNU extension and the archives
2266 created in this mode should be read only using GNU `tar'.  If you
2267 absolutely have to process such archives using a third-party `tar'
2268 implementation, read *note Split Recovery::.
2269
2270    ---------- Footnotes ----------
2271
2272    (1) If you run GNU `tar' under a different locale, the translation
2273 to the locale's language will be used.
2274
2275    (2) *Note --restrict::, for more information about this option
2276
2277 \1f
2278 File: tar.info,  Node: Tape Files,  Next: Tarcat,  Prev: Multi-Volume Archives,  Up: Using Multiple Tapes
2279
2280 9.6.2 Tape Files
2281 ----------------
2282
2283      _(This message will disappear, once this node revised.)_
2284
2285 To give the archive a name which will be recorded in it, use the
2286 `--label=VOLUME-LABEL' (`-V VOLUME-LABEL') option.  This will write a
2287 special block identifying VOLUME-LABEL as the name of the archive to
2288 the front of the archive which will be displayed when the archive is
2289 listed with `--list'.  If you are creating a multi-volume archive with
2290 `--multi-volume' (*note Using Multiple Tapes::), then the volume label
2291 will have `Volume NNN' appended to the name you give, where NNN is the
2292 number of the volume of the archive.  (If you use the
2293 `--label=VOLUME-LABEL') option when reading an archive, it checks to
2294 make sure the label on the tape matches the one you give. *Note label::.
2295
2296    When `tar' writes an archive to tape, it creates a single tape file.
2297 If multiple archives are written to the same tape, one after the other,
2298 they each get written as separate tape files.  When extracting, it is
2299 necessary to position the tape at the right place before running `tar'.
2300 To do this, use the `mt' command.  For more information on the `mt'
2301 command and on the organization of tapes into a sequence of tape files,
2302 see *note mt::.
2303
2304    People seem to often do:
2305
2306      --label="SOME-PREFIX `date +SOME-FORMAT`"
2307
2308    or such, for pushing a common date in all volumes or an archive set.
2309
2310 \1f
2311 File: tar.info,  Node: Tarcat,  Prev: Tape Files,  Up: Using Multiple Tapes
2312
2313 9.6.3 Concatenate Volumes into a Single Archive
2314 -----------------------------------------------
2315
2316 Sometimes it is necessary to convert existing GNU `tar' multi-volume
2317 archive to a single `tar' archive.  Simply concatenating all volumes
2318 into one will not work, since each volume carries an additional
2319 information at the beginning.  GNU `tar' is shipped with the shell
2320 script `tarcat' designed for this purpose.
2321
2322    The script takes a list of files comprising a multi-volume archive
2323 and creates the resulting archive at the standard output.  For example:
2324
2325      tarcat vol.1 vol.2 vol.3 | tar tf -
2326
2327    The script implements a simple heuristics to determine the format of
2328 the first volume file and to decide how to process the rest of the
2329 files.  However, it makes no attempt to verify whether the files are
2330 given in order or even if they are valid `tar' archives.  It uses `dd'
2331 and does not filter its standard error, so you will usually see lots of
2332 spurious messages.
2333
2334 \1f
2335 File: tar.info,  Node: label,  Next: verify,  Prev: Using Multiple Tapes,  Up: Media
2336
2337 9.7 Including a Label in the Archive
2338 ====================================
2339
2340      _(This message will disappear, once this node revised.)_
2341
2342 To avoid problems caused by misplaced paper labels on the archive
2343 media, you can include a "label" entry--an archive member which
2344 contains the name of the archive--in the archive itself.  Use the
2345 `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') option in conjunction with
2346 the `--create' operation to include a label entry in the archive as it
2347 is being created.
2348
2349 `--label=ARCHIVE-LABEL'
2350 `-V ARCHIVE-LABEL'
2351      Includes an "archive-label" at the beginning of the archive when
2352      the archive is being created, when used in conjunction with the
2353      `--create' operation.  Checks to make sure the archive label
2354      matches the one specified (when used in conjunction with any other
2355      operation.
2356
2357    If you create an archive using both `--label=ARCHIVE-LABEL' (`-V
2358 ARCHIVE-LABEL') and `--multi-volume' (`-M'), each volume of the archive
2359 will have an archive label of the form `ARCHIVE-LABEL Volume N', where
2360 N is 1 for the first volume, 2 for the next, and so on. *Note Using
2361 Multiple Tapes::, for information on creating multiple volume archives.
2362
2363    The volume label will be displayed by `--list' along with the file
2364 contents.  If verbose display is requested, it will also be explicitly
2365 marked as in the example below:
2366
2367      $ tar --verbose --list --file=iamanarchive
2368      V--------- 0 0        0 1992-03-07 12:01 iamalabel--Volume Header--
2369      -rw-r--r-- ringo user 40 1990-05-21 13:30 iamafilename
2370
2371    However, `--list' option will cause listing entire contents of the
2372 archive, which may be undesirable (for example, if the archive is
2373 stored on a tape).  You can request checking only the volume by
2374 specifying `--test-label' option.  This option reads only the first
2375 block of an archive, so it can be used with slow storage devices.  For
2376 example:
2377
2378      $ tar --test-label --file=iamanarchive
2379      iamalabel
2380
2381    If `--test-label' is used with a single command line argument, `tar'
2382 compares the volume label with the argument.  It exits with code 0 if
2383 the two strings match, and with code 2 otherwise.  In this case no
2384 output is displayed.  For example:
2385
2386      $ tar --test-label --file=iamanarchive 'iamalable'
2387      => 0
2388      $ tar --test-label --file=iamanarchive 'iamalable' alabel
2389      => 1
2390
2391    If you request any operation, other than `--create', along with
2392 using `--label' option, `tar' will first check if the archive label
2393 matches the one specified and will refuse to proceed if it does not.
2394 Use this as a safety precaution to avoid accidentally overwriting
2395 existing archives.  For example, if you wish to add files to `archive',
2396 presumably labeled with string `My volume', you will get:
2397
2398      $ tar -rf archive --label 'My volume' .
2399      tar: Archive not labeled to match `My volume'
2400
2401 in case its label does not match.  This will work even if `archive' is
2402 not labeled at all.
2403
2404    Similarly, `tar' will refuse to list or extract the archive if its
2405 label doesn't match the ARCHIVE-LABEL specified.  In those cases,
2406 ARCHIVE-LABEL argument is interpreted as a globbing-style pattern which
2407 must match the actual magnetic volume label.  *Note exclude::, for a
2408 precise description of how match is attempted(1).  If the switch
2409 `--multi-volume' (`-M') is being used, the volume label matcher will
2410 also suffix ARCHIVE-LABEL by ` Volume [1-9]*' if the initial match
2411 fails, before giving up.  Since the volume numbering is automatically
2412 added in labels at creation time, it sounded logical to equally help
2413 the user taking care of it when the archive is being read.
2414
2415    The `--label' was once called `--volume', but is not available under
2416 that name anymore.
2417
2418    You can also use `--label' to get a common information on all tapes
2419 of a series.  For having this information different in each series
2420 created through a single script used on a regular basis, just manage to
2421 get some date string as part of the label.  For example:
2422
2423      $ tar cfMV /dev/tape "Daily backup for `date +%Y-%m-%d`"
2424      $ tar --create --file=/dev/tape --multi-volume \
2425           --volume="Daily backup for `date +%Y-%m-%d`"
2426
2427    Also note that each label has its own date and time, which
2428 corresponds to when GNU `tar' initially attempted to write it, often
2429 soon after the operator launches `tar' or types the carriage return
2430 telling that the next tape is ready.  Comparing date labels does give
2431 an idea of tape throughput only if the delays for rewinding tapes and
2432 the operator switching them were negligible, which is usually not the
2433 case.
2434
2435    ---------- Footnotes ----------
2436
2437    (1) Previous versions of `tar' used full regular expression
2438 matching, or before that, only exact string matching, instead of
2439 wildcard matchers.  We decided for the sake of simplicity to use a
2440 uniform matching device through `tar'.
2441
2442 \1f
2443 File: tar.info,  Node: verify,  Next: Write Protection,  Prev: label,  Up: Media
2444
2445 9.8 Verifying Data as It is Stored
2446 ==================================
2447
2448 `-W'
2449 `--verify'
2450      Attempt to verify the archive after writing.
2451
2452    This option causes `tar' to verify the archive after writing it.
2453 Each volume is checked after it is written, and any discrepancies are
2454 recorded on the standard error output.
2455
2456    Verification requires that the archive be on a back-space-able
2457 medium.  This means pipes, some cartridge tape drives, and some other
2458 devices cannot be verified.
2459
2460    You can insure the accuracy of an archive by comparing files in the
2461 system with archive members.  `tar' can compare an archive to the file
2462 system as the archive is being written, to verify a write operation, or
2463 can compare a previously written archive, to insure that it is up to
2464 date.
2465
2466    To check for discrepancies in an archive immediately after it is
2467 written, use the `--verify' (`-W') option in conjunction with the
2468 `--create' operation.  When this option is specified, `tar' checks
2469 archive members against their counterparts in the file system, and
2470 reports discrepancies on the standard error.
2471
2472    To verify an archive, you must be able to read it from before the end
2473 of the last written entry.  This option is useful for detecting data
2474 errors on some tapes.  Archives written to pipes, some cartridge tape
2475 drives, and some other devices cannot be verified.
2476
2477    One can explicitly compare an already made archive with the file
2478 system by using the `--compare' (`--diff', `-d') option, instead of
2479 using the more automatic `--verify' option.  *Note compare::.
2480
2481    Note that these two options have a slightly different intent.  The
2482 `--compare' option checks how identical are the logical contents of some
2483 archive with what is on your disks, while the `--verify' option is
2484 really for checking if the physical contents agree and if the recording
2485 media itself is of dependable quality.  So, for the `--verify'
2486 operation, `tar' tries to defeat all in-memory cache pertaining to the
2487 archive, while it lets the speed optimization undisturbed for the
2488 `--compare' option.  If you nevertheless use `--compare' for media
2489 verification, you may have to defeat the in-memory cache yourself,
2490 maybe by opening and reclosing the door latch of your recording unit,
2491 forcing some doubt in your operating system about the fact this is
2492 really the same volume as the one just written or read.
2493
2494    The `--verify' option would not be necessary if drivers were indeed
2495 able to detect dependably all write failures.  This sometimes require
2496 many magnetic heads, some able to read after the writes occurred.  One
2497 would not say that drivers unable to detect all cases are necessarily
2498 flawed, as long as programming is concerned.
2499
2500    The `--verify' (`-W') option will not work in conjunction with the
2501 `--multi-volume' (`-M') option or the `--append' (`-r'), `--update'
2502 (`-u') and `--delete' operations.  *Note Operations::, for more
2503 information on these operations.
2504
2505    Also, since `tar' normally strips leading `/' from file names (*note
2506 absolute::), a command like `tar --verify -cf /tmp/foo.tar /etc' will
2507 work as desired only if the working directory is `/', as `tar' uses the
2508 archive's relative member names (e.g., `etc/motd') when verifying the
2509 archive.
2510
2511 \1f
2512 File: tar.info,  Node: Write Protection,  Prev: verify,  Up: Media
2513
2514 9.9 Write Protection
2515 ====================
2516
2517 Almost all tapes and diskettes, and in a few rare cases, even disks can
2518 be "write protected", to protect data on them from being changed.  Once
2519 an archive is written, you should write protect the media to prevent
2520 the archive from being accidentally overwritten or deleted.  (This will
2521 protect the archive from being changed with a tape or floppy drive--it
2522 will not protect it from magnet fields or other physical hazards).
2523
2524    The write protection device itself is usually an integral part of the
2525 physical media, and can be a two position (write enabled/write
2526 disabled) switch, a notch which can be popped out or covered, a ring
2527 which can be removed from the center of a tape reel, or some other
2528 changeable feature.
2529
2530 \1f
2531 File: tar.info,  Node: Changes,  Next: Configuring Help Summary,  Prev: Media,  Up: Top
2532
2533 Appendix A Changes
2534 ******************
2535
2536 This appendix lists some important user-visible changes between version
2537 GNU `tar' 1.22 and previous versions. An up-to-date version of this
2538 document is available at the GNU `tar' documentation page
2539 (http://www.gnu.org/software/tar/manual/changes.html).
2540
2541 Use of globbing patterns when listing and extracting.
2542      Previous versions of GNU tar assumed shell-style globbing when
2543      extracting from or listing an archive.  For example:
2544
2545           $ tar xf foo.tar '*.c'
2546
2547      would extract all files whose names end in `.c'.  This behavior
2548      was not documented and was incompatible with traditional tar
2549      implementations.  Therefore, starting from version 1.15.91, GNU tar
2550      no longer uses globbing by default.  For example, the above
2551      invocation is now interpreted as a request to extract from the
2552      archive the file named `*.c'.
2553
2554      To facilitate transition to the new behavior for those users who
2555      got used to the previous incorrect one, `tar' will print a warning
2556      if it finds out that a requested member was not found in the
2557      archive and its name looks like a globbing pattern.  For example:
2558
2559           $ tar xf foo.tar  '*.c'
2560           tar: Pattern matching characters used in file names. Please,
2561           tar: use --wildcards to enable pattern matching, or --no-wildcards to
2562           tar: suppress this warning.
2563           tar: *.c: Not found in archive
2564           tar: Error exit delayed from previous errors
2565
2566      To treat member names as globbing patterns, use -wildcards option.
2567      If you want to tar to mimic the behavior of versions prior to
2568      1.15.91, add this option to your `TAR_OPTIONS' variable.
2569
2570      *Note wildcards::, for the detailed discussion of the use of
2571      globbing patterns by GNU `tar'.
2572
2573 Use of short option `-o'.
2574      Earlier versions of GNU `tar' understood `-o' command line option
2575      as a synonym for `--old-archive'.
2576
2577      GNU `tar' starting from version 1.13.90 understands this option as
2578      a synonym for `--no-same-owner'.  This is compatible with UNIX98
2579      `tar' implementations.
2580
2581      However, to facilitate transition, `-o' option retains its old
2582      semantics when it is used with one of archive-creation commands.
2583      Users are encouraged to use `--format=oldgnu' instead.
2584
2585      It is especially important, since versions of GNU Automake up to
2586      and including 1.8.4 invoke tar with this option to produce
2587      distribution tarballs.  *Note v7: Formats, for the detailed
2588      discussion of this issue and its implications.
2589
2590      .  *Note tar-v7: (automake)Options, for a description on how to
2591      use various archive formats with `automake'.
2592
2593      Future versions of GNU `tar' will understand `-o' only as a
2594      synonym for `--no-same-owner'.
2595
2596 Use of short option `-l'
2597      Earlier versions of GNU `tar' understood `-l' option as a synonym
2598      for `--one-file-system'.  Since such usage contradicted to UNIX98
2599      specification and harmed compatibility with other implementation,
2600      it was declared deprecated in version 1.14.  However, to
2601      facilitate transition to its new semantics, it was supported by
2602      versions 1.15 and 1.15.90.  The present use of `-l' as a short
2603      variant of `--check-links' was introduced in version 1.15.91.
2604
2605 Use of options `--portability' and `--old-archive'
2606      These options are deprecated.  Please use `--format=v7' instead.
2607
2608 Use of option `--posix'
2609      This option is deprecated.  Please use `--format=posix' instead.
2610
2611 \1f
2612 File: tar.info,  Node: Configuring Help Summary,  Next: Fixing Snapshot Files,  Prev: Changes,  Up: Top
2613
2614 Appendix B Configuring Help Summary
2615 ***********************************
2616
2617 Running `tar --help' displays the short `tar' option summary (*note
2618 help::). This summary is organized by "groups" of semantically close
2619 options. The options within each group are printed in the following
2620 order: a short option, eventually followed by a list of corresponding
2621 long option names, followed by a short description of the option. For
2622 example, here is an excerpt from the actual `tar --help' output:
2623
2624  Main operation mode:
2625
2626   -A, --catenate, --concatenate   append tar files to an archive
2627   -c, --create               create a new archive
2628   -d, --diff, --compare      find differences between archive and
2629                              file system
2630       --delete               delete from the archive
2631
2632    The exact visual representation of the help output is configurable
2633 via `ARGP_HELP_FMT' environment variable. The value of this variable is
2634 a comma-separated list of "format variable" assignments. There are two
2635 kinds of format variables. An "offset variable" keeps the offset of
2636 some part of help output text from the leftmost column on the screen. A
2637 "boolean" variable is a flag that toggles some output feature on or
2638 off. Depending on the type of the corresponding variable, there are two
2639 kinds of assignments:
2640
2641 Offset assignment
2642      The assignment to an offset variable has the following syntax:
2643
2644           VARIABLE=VALUE
2645
2646      where VARIABLE is the variable name, and VALUE is a numeric value
2647      to be assigned to the variable.
2648
2649 Boolean assignment
2650      To assign `true' value to a variable, simply put this variable
2651      name. To assign `false' value, prefix the variable name with
2652      `no-'. For example:
2653
2654           # Assign `true' value:
2655           dup-args
2656           # Assign `false' value:
2657           no-dup-args
2658
2659    Following variables are declared:
2660
2661  -- Help Output: boolean dup-args
2662      If true, arguments for an option are shown with both short and long
2663      options, even when a given option has both forms, for example:
2664
2665             -f ARCHIVE, --file=ARCHIVE use archive file or device ARCHIVE
2666
2667      If false, then if an option has both short and long forms, the
2668      argument is only shown with the long one, for example:
2669
2670             -f, --file=ARCHIVE         use archive file or device ARCHIVE
2671
2672      and a message indicating that the argument is applicable to both
2673      forms is printed below the options. This message can be disabled
2674      using `dup-args-note' (see below).
2675
2676      The default is false.
2677
2678  -- Help Output: boolean dup-args-note
2679      If this variable is true, which is the default, the following
2680      notice is displayed at the end of the help output:
2681
2682           Mandatory or optional arguments to long options are also
2683           mandatory or optional for any corresponding short options.
2684
2685      Setting `no-dup-args-note' inhibits this message. Normally, only
2686      one of variables `dup-args' or `dup-args-note' should be set.
2687
2688  -- Help Output: offset short-opt-col
2689      Column in which short options start. Default is 2.
2690
2691           $ tar --help|grep ARCHIVE
2692             -f, --file=ARCHIVE   use archive file or device ARCHIVE
2693           $ ARGP_HELP_FMT=short-opt-col=6 tar --help|grep ARCHIVE
2694                 -f, --file=ARCHIVE   use archive file or device ARCHIVE
2695
2696  -- Help Output: offset long-opt-col
2697      Column in which long options start. Default is 6. For example:
2698
2699           $ tar --help|grep ARCHIVE
2700             -f, --file=ARCHIVE   use archive file or device ARCHIVE
2701           $ ARGP_HELP_FMT=long-opt-col=16 tar --help|grep ARCHIVE
2702             -f,           --file=ARCHIVE   use archive file or device ARCHIVE
2703
2704  -- Help Output: offset doc-opt-col
2705      Column in which "doc options" start.  A doc option isn't actually
2706      an option, but rather an arbitrary piece of documentation that is
2707      displayed in much the same manner as the options.  For example, in
2708      the description of `--format' option:
2709
2710             -H, --format=FORMAT        create archive of the given format.
2711
2712            FORMAT is one of the following:
2713
2714               gnu                      GNU tar 1.13.x format
2715               oldgnu                   GNU format as per tar <= 1.12
2716               pax                      POSIX 1003.1-2001 (pax) format
2717               posix                    same as pax
2718               ustar                    POSIX 1003.1-1988 (ustar) format
2719               v7                       old V7 tar format
2720
2721      the format names are doc options. Thus, if you set
2722      `ARGP_HELP_FMT=doc-opt-col=6' the above part of the help output
2723      will look as follows:
2724
2725             -H, --format=FORMAT        create archive of the given format.
2726
2727            FORMAT is one of the following:
2728
2729                   gnu                      GNU tar 1.13.x format
2730                   oldgnu                   GNU format as per tar <= 1.12
2731                   pax                      POSIX 1003.1-2001 (pax) format
2732                   posix                    same as pax
2733                   ustar                    POSIX 1003.1-1988 (ustar) format
2734                   v7                       old V7 tar format
2735
2736  -- Help Output: offset opt-doc-col
2737      Column in which option description starts. Default is 29.
2738
2739           $ tar --help|grep ARCHIVE
2740             -f, --file=ARCHIVE         use archive file or device ARCHIVE
2741           $ ARGP_HELP_FMT=opt-doc-col=19 tar --help|grep ARCHIVE
2742             -f, --file=ARCHIVE   use archive file or device ARCHIVE
2743           $ ARGP_HELP_FMT=opt-doc-col=9 tar --help|grep ARCHIVE
2744             -f, --file=ARCHIVE
2745                      use archive file or device ARCHIVE
2746
2747      Notice, that the description starts on a separate line if
2748      `opt-doc-col' value is too small.
2749
2750  -- Help Output: offset header-col
2751      Column in which "group headers" are printed.  A group header is a
2752      descriptive text preceding an option group.  For example, in the
2753      following text:
2754
2755       Main operation mode:
2756
2757        -A, --catenate, --concatenate   append tar files to
2758                                   an archive
2759        -c, --create               create a new archive
2760       `Main operation mode:' is the group header.
2761
2762      The default value is 1.
2763
2764  -- Help Output: offset usage-indent
2765      Indentation of wrapped usage lines. Affects `--usage' output.
2766      Default is 12.
2767
2768  -- Help Output: offset rmargin
2769      Right margin of the text output. Used for wrapping.
2770
2771 \1f
2772 File: tar.info,  Node: Fixing Snapshot Files,  Next: Tar Internals,  Prev: Configuring Help Summary,  Up: Top
2773
2774 Appendix C Fixing Snapshot Files
2775 ********************************
2776
2777 Sometimes device numbers can change after upgrading your kernel version
2778 or recofiguring the harvare.  Reportedly this is the case with some
2779 newer Linux kernels, when using LVM.  In majority of cases this change
2780 is unnoticed by the users.  However, it influences `tar' incremental
2781 backups: the device number is stored in tar snapshot files (*note
2782 Snapshot Files::) and is used to determine whether the file has changed
2783 since the last backup.  If the device numbers change for some reason,
2784 the next backup you run will be a full backup.
2785
2786    To minimize the impact in these cases, GNU `tar' comes with the
2787 `tar-snapshot-edit' utility for inspecting and updating device numbers
2788 in snapshot files.  The utility, written by Dustin J. Mitchell, is
2789 available from GNU `tar' home page
2790 (http://www.gnu.org/software/tar/utils/tar-snapshot-edit.html).
2791
2792    To obtain the device numbers used in the snapshot file, run
2793
2794      $ tar-snapshot-edit SNAPFILE
2795
2796 where SNAPFILE is the name of the snapshot file (you can supply as many
2797 files as you wish in a single command line ).
2798
2799    To update all occurrences of the given device number in the file, use
2800 `-r' option.  It takes a single argument of the form `OLDDEV-NEWDEV',
2801 where OLDDEV is the device number used in the snapshot file, and NEWDEV
2802 is the corresponding new device number.  Both numbers may be specified
2803 in hex (e.g., `0xfe01'), decimal (e.g., `65025'), or as a major:minor
2804 number pair (e.g., `254:1').  To change several device numbers at once,
2805 specify them in a single comma-separated list, as in `-r
2806 0x3060-0x4500,0x307-0x4600'.
2807
2808    Before updating the snapshot file, it is a good idea to create a
2809 backup copy of it.  This is accomplished by `-b' option.  The name of
2810 the backup file is obtained by appending `~' to the original file name.
2811
2812    An example session:
2813      $ tar-snapshot-edit /var/backup/snap.a
2814      file version 2
2815      /tmp/snap: Device 0x0306 occurs 634 times.
2816      $ tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a
2817      file version 2
2818
2819 \1f
2820 File: tar.info,  Node: Tar Internals,  Next: Genfile,  Prev: Fixing Snapshot Files,  Up: Top
2821
2822 Appendix D Tar Internals
2823 ************************
2824
2825 * Menu:
2826
2827 * Standard::           Basic Tar Format
2828 * Extensions::         GNU Extensions to the Archive Format
2829 * Sparse Formats::     Storing Sparse Files
2830 * Snapshot Files::
2831 * Dumpdir::
2832
2833 \1f
2834 File: tar.info,  Node: Standard,  Next: Extensions,  Up: Tar Internals
2835
2836 Basic Tar Format
2837 ================
2838
2839      _(This message will disappear, once this node revised.)_
2840
2841 While an archive may contain many files, the archive itself is a single
2842 ordinary file.  Like any other file, an archive file can be written to
2843 a storage device such as a tape or disk, sent through a pipe or over a
2844 network, saved on the active file system, or even stored in another
2845 archive.  An archive file is not easy to read or manipulate without
2846 using the `tar' utility or Tar mode in GNU Emacs.
2847
2848    Physically, an archive consists of a series of file entries
2849 terminated by an end-of-archive entry, which consists of two 512 blocks
2850 of zero bytes.  A file entry usually describes one of the files in the
2851 archive (an "archive member"), and consists of a file header and the
2852 contents of the file.  File headers contain file names and statistics,
2853 checksum information which `tar' uses to detect file corruption, and
2854 information about file types.
2855
2856    Archives are permitted to have more than one member with the same
2857 member name.  One way this situation can occur is if more than one
2858 version of a file has been stored in the archive.  For information
2859 about adding new versions of a file to an archive, see *note update::.
2860
2861    In addition to entries describing archive members, an archive may
2862 contain entries which `tar' itself uses to store information.  *Note
2863 label::, for an example of such an archive entry.
2864
2865    A `tar' archive file contains a series of blocks.  Each block
2866 contains `BLOCKSIZE' bytes.  Although this format may be thought of as
2867 being on magnetic tape, other media are often used.
2868
2869    Each file archived is represented by a header block which describes
2870 the file, followed by zero or more blocks which give the contents of
2871 the file.  At the end of the archive file there are two 512-byte blocks
2872 filled with binary zeros as an end-of-file marker.  A reasonable system
2873 should write such end-of-file marker at the end of an archive, but must
2874 not assume that such a block exists when reading an archive.  In
2875 particular GNU `tar' always issues a warning if it does not encounter
2876 it.
2877
2878    The blocks may be "blocked" for physical I/O operations.  Each
2879 record of N blocks (where N is set by the `--blocking-factor=512-SIZE'
2880 (`-b 512-SIZE') option to `tar') is written with a single `write ()'
2881 operation.  On magnetic tapes, the result of such a write is a single
2882 record.  When writing an archive, the last record of blocks should be
2883 written at the full size, with blocks after the zero block containing
2884 all zeros.  When reading an archive, a reasonable system should
2885 properly handle an archive whose last record is shorter than the rest,
2886 or which contains garbage records after a zero block.
2887
2888    The header block is defined in C as follows.  In the GNU `tar'
2889 distribution, this is part of file `src/tar.h':
2890
2891
2892      /* tar Header Block, from POSIX 1003.1-1990.  */
2893
2894      /* POSIX header.  */
2895
2896      struct posix_header
2897      {                              /* byte offset */
2898        char name[100];               /*   0 */
2899        char mode[8];                 /* 100 */
2900        char uid[8];                  /* 108 */
2901        char gid[8];                  /* 116 */
2902        char size[12];                /* 124 */
2903        char mtime[12];               /* 136 */
2904        char chksum[8];               /* 148 */
2905        char typeflag;                /* 156 */
2906        char linkname[100];           /* 157 */
2907        char magic[6];                /* 257 */
2908        char version[2];              /* 263 */
2909        char uname[32];               /* 265 */
2910        char gname[32];               /* 297 */
2911        char devmajor[8];             /* 329 */
2912        char devminor[8];             /* 337 */
2913        char prefix[155];             /* 345 */
2914                                      /* 500 */
2915      };
2916
2917      #define TMAGIC   "ustar"        /* ustar and a null */
2918      #define TMAGLEN  6
2919      #define TVERSION "00"           /* 00 and no null */
2920      #define TVERSLEN 2
2921
2922      /* Values used in typeflag field.  */
2923      #define REGTYPE  '0'            /* regular file */
2924      #define AREGTYPE '\0'           /* regular file */
2925      #define LNKTYPE  '1'            /* link */
2926      #define SYMTYPE  '2'            /* reserved */
2927      #define CHRTYPE  '3'            /* character special */
2928      #define BLKTYPE  '4'            /* block special */
2929      #define DIRTYPE  '5'            /* directory */
2930      #define FIFOTYPE '6'            /* FIFO special */
2931      #define CONTTYPE '7'            /* reserved */
2932
2933      #define XHDTYPE  'x'            /* Extended header referring to the
2934                                         next file in the archive */
2935      #define XGLTYPE  'g'            /* Global extended header */
2936
2937      /* Bits used in the mode field, values in octal.  */
2938      #define TSUID    04000          /* set UID on execution */
2939      #define TSGID    02000          /* set GID on execution */
2940      #define TSVTX    01000          /* reserved */
2941                                      /* file permissions */
2942      #define TUREAD   00400          /* read by owner */
2943      #define TUWRITE  00200          /* write by owner */
2944      #define TUEXEC   00100          /* execute/search by owner */
2945      #define TGREAD   00040          /* read by group */
2946      #define TGWRITE  00020          /* write by group */
2947      #define TGEXEC   00010          /* execute/search by group */
2948      #define TOREAD   00004          /* read by other */
2949      #define TOWRITE  00002          /* write by other */
2950      #define TOEXEC   00001          /* execute/search by other */
2951
2952      /* tar Header Block, GNU extensions.  */
2953
2954      /* In GNU tar, SYMTYPE is for to symbolic links, and CONTTYPE is for
2955         contiguous files, so maybe disobeying the `reserved' comment in POSIX
2956         header description.  I suspect these were meant to be used this way, and
2957         should not have really been `reserved' in the published standards.  */
2958
2959      /* *BEWARE* *BEWARE* *BEWARE* that the following information is still
2960         boiling, and may change.  Even if the OLDGNU format description should be
2961         accurate, the so-called GNU format is not yet fully decided.  It is
2962         surely meant to use only extensions allowed by POSIX, but the sketch
2963         below repeats some ugliness from the OLDGNU format, which should rather
2964         go away.  Sparse files should be saved in such a way that they do *not*
2965         require two passes at archive creation time.  Huge files get some POSIX
2966         fields to overflow, alternate solutions have to be sought for this.  */
2967
2968      /* Descriptor for a single file hole.  */
2969
2970      struct sparse
2971      {                              /* byte offset */
2972        char offset[12];              /*   0 */
2973        char numbytes[12];            /*  12 */
2974                                      /*  24 */
2975      };
2976
2977      /* Sparse files are not supported in POSIX ustar format.  For sparse files
2978         with a POSIX header, a GNU extra header is provided which holds overall
2979         sparse information and a few sparse descriptors.  When an old GNU header
2980         replaces both the POSIX header and the GNU extra header, it holds some
2981         sparse descriptors too.  Whether POSIX or not, if more sparse descriptors
2982         are still needed, they are put into as many successive sparse headers as
2983         necessary.  The following constants tell how many sparse descriptors fit
2984         in each kind of header able to hold them.  */
2985
2986      #define SPARSES_IN_EXTRA_HEADER  16
2987      #define SPARSES_IN_OLDGNU_HEADER 4
2988      #define SPARSES_IN_SPARSE_HEADER 21
2989
2990      /* Extension header for sparse files, used immediately after the GNU extra
2991         header, and used only if all sparse information cannot fit into that
2992         extra header.  There might even be many such extension headers, one after
2993         the other, until all sparse information has been recorded.  */
2994
2995      struct sparse_header
2996      {                              /* byte offset */
2997        struct sparse sp[SPARSES_IN_SPARSE_HEADER];
2998                                      /*   0 */
2999        char isextended;              /* 504 */
3000                                      /* 505 */
3001      };
3002
3003      /* The old GNU format header conflicts with POSIX format in such a way that
3004         POSIX archives may fool old GNU tar's, and POSIX tar's might well be
3005         fooled by old GNU tar archives.  An old GNU format header uses the space
3006         used by the prefix field in a POSIX header, and cumulates information
3007         normally found in a GNU extra header.  With an old GNU tar header, we
3008         never see any POSIX header nor GNU extra header.  Supplementary sparse
3009         headers are allowed, however.  */
3010
3011      struct oldgnu_header
3012      {                              /* byte offset */
3013        char unused_pad1[345];        /*   0 */
3014        char atime[12];               /* 345 Incr. archive: atime of the file */
3015        char ctime[12];               /* 357 Incr. archive: ctime of the file */
3016        char offset[12];              /* 369 Multivolume archive: the offset of
3017                                         the start of this volume */
3018        char longnames[4];            /* 381 Not used */
3019        char unused_pad2;             /* 385 */
3020        struct sparse sp[SPARSES_IN_OLDGNU_HEADER];
3021                                      /* 386 */
3022        char isextended;              /* 482 Sparse file: Extension sparse header
3023                                         follows */
3024        char realsize[12];            /* 483 Sparse file: Real size*/
3025                                      /* 495 */
3026      };
3027
3028      /* OLDGNU_MAGIC uses both magic and version fields, which are contiguous.
3029         Found in an archive, it indicates an old GNU header format, which will be
3030         hopefully become obsolescent.  With OLDGNU_MAGIC, uname and gname are
3031         valid, though the header is not truly POSIX conforming.  */
3032      #define OLDGNU_MAGIC "ustar  "  /* 7 chars and a null */
3033
3034      /* The standards committee allows only capital A through capital Z for
3035         user-defined expansion.  Other letters in use include:
3036
3037         'A' Solaris Access Control List
3038         'E' Solaris Extended Attribute File
3039         'I' Inode only, as in 'star'
3040         'N' Obsolete GNU tar, for file names that do not fit into the main header.
3041         'X' POSIX 1003.1-2001 eXtended (VU version)  */
3042
3043      /* This is a dir entry that contains the names of files that were in the
3044         dir at the time the dump was made.  */
3045      #define GNUTYPE_DUMPDIR 'D'
3046
3047      /* Identifies the *next* file on the tape as having a long linkname.  */
3048      #define GNUTYPE_LONGLINK 'K'
3049
3050      /* Identifies the *next* file on the tape as having a long name.  */
3051      #define GNUTYPE_LONGNAME 'L'
3052
3053      /* This is the continuation of a file that began on another volume.  */
3054      #define GNUTYPE_MULTIVOL 'M'
3055
3056      /* This is for sparse files.  */
3057      #define GNUTYPE_SPARSE 'S'
3058
3059      /* This file is a tape/volume header.  Ignore it on extraction.  */
3060      #define GNUTYPE_VOLHDR 'V'
3061
3062      /* Solaris extended header */
3063      #define SOLARIS_XHDTYPE 'X'
3064
3065      /* Jo"rg Schilling star header */
3066
3067      struct star_header
3068      {                              /* byte offset */
3069        char name[100];               /*   0 */
3070        char mode[8];                 /* 100 */
3071        char uid[8];                  /* 108 */
3072        char gid[8];                  /* 116 */
3073        char size[12];                /* 124 */
3074        char mtime[12];               /* 136 */
3075        char chksum[8];               /* 148 */
3076        char typeflag;                /* 156 */
3077        char linkname[100];           /* 157 */
3078        char magic[6];                /* 257 */
3079        char version[2];              /* 263 */
3080        char uname[32];               /* 265 */
3081        char gname[32];               /* 297 */
3082        char devmajor[8];             /* 329 */
3083        char devminor[8];             /* 337 */
3084        char prefix[131];             /* 345 */
3085        char atime[12];               /* 476 */
3086        char ctime[12];               /* 488 */
3087                                      /* 500 */
3088      };
3089
3090      #define SPARSES_IN_STAR_HEADER      4
3091      #define SPARSES_IN_STAR_EXT_HEADER  21
3092
3093      struct star_in_header
3094      {
3095        char fill[345];       /*   0  Everything that is before t_prefix */
3096        char prefix[1];       /* 345  t_name prefix */
3097        char fill2;           /* 346  */
3098        char fill3[8];        /* 347  */
3099        char isextended;      /* 355  */
3100        struct sparse sp[SPARSES_IN_STAR_HEADER]; /* 356  */
3101        char realsize[12];    /* 452  Actual size of the file */
3102        char offset[12];      /* 464  Offset of multivolume contents */
3103        char atime[12];       /* 476  */
3104        char ctime[12];       /* 488  */
3105        char mfill[8];        /* 500  */
3106        char xmagic[4];       /* 508  "tar" */
3107      };
3108
3109      struct star_ext_header
3110      {
3111        struct sparse sp[SPARSES_IN_STAR_EXT_HEADER];
3112        char isextended;
3113      };
3114
3115    All characters in header blocks are represented by using 8-bit
3116 characters in the local variant of ASCII.  Each field within the
3117 structure is contiguous; that is, there is no padding used within the
3118 structure.  Each character on the archive medium is stored contiguously.
3119
3120    Bytes representing the contents of files (after the header block of
3121 each file) are not translated in any way and are not constrained to
3122 represent characters in any character set.  The `tar' format does not
3123 distinguish text files from binary files, and no translation of file
3124 contents is performed.
3125
3126    The `name', `linkname', `magic', `uname', and `gname' are
3127 null-terminated character strings.  All other fields are zero-filled
3128 octal numbers in ASCII.  Each numeric field of width W contains W minus
3129 1 digits, and a null.
3130
3131    The `name' field is the file name of the file, with directory names
3132 (if any) preceding the file name, separated by slashes.
3133
3134    The `mode' field provides nine bits specifying file permissions and
3135 three bits to specify the Set UID, Set GID, and Save Text ("sticky")
3136 modes.  Values for these bits are defined above.  When special
3137 permissions are required to create a file with a given mode, and the
3138 user restoring files from the archive does not hold such permissions,
3139 the mode bit(s) specifying those special permissions are ignored.
3140 Modes which are not supported by the operating system restoring files
3141 from the archive will be ignored.  Unsupported modes should be faked up
3142 when creating or updating an archive; e.g., the group permission could
3143 be copied from the _other_ permission.
3144
3145    The `uid' and `gid' fields are the numeric user and group ID of the
3146 file owners, respectively.  If the operating system does not support
3147 numeric user or group IDs, these fields should be ignored.
3148
3149    The `size' field is the size of the file in bytes; linked files are
3150 archived with this field specified as zero.
3151
3152    The `mtime' field is the data modification time of the file at the
3153 time it was archived.  It is the ASCII representation of the octal
3154 value of the last time the file's contents were modified, represented
3155 as an integer number of seconds since January 1, 1970, 00:00
3156 Coordinated Universal Time.
3157
3158    The `chksum' field is the ASCII representation of the octal value of
3159 the simple sum of all bytes in the header block.  Each 8-bit byte in
3160 the header is added to an unsigned integer, initialized to zero, the
3161 precision of which shall be no less than seventeen bits.  When
3162 calculating the checksum, the `chksum' field is treated as if it were
3163 all blanks.
3164
3165    The `typeflag' field specifies the type of file archived.  If a
3166 particular implementation does not recognize or permit the specified
3167 type, the file will be extracted as if it were a regular file.  As this
3168 action occurs, `tar' issues a warning to the standard error.
3169
3170    The `atime' and `ctime' fields are used in making incremental
3171 backups; they store, respectively, the particular file's access and
3172 status change times.
3173
3174    The `offset' is used by the `--multi-volume' (`-M') option, when
3175 making a multi-volume archive.  The offset is number of bytes into the
3176 file that we need to restart at to continue the file on the next tape,
3177 i.e., where we store the location that a continued file is continued at.
3178
3179    The following fields were added to deal with sparse files.  A file
3180 is "sparse" if it takes in unallocated blocks which end up being
3181 represented as zeros, i.e., no useful data.  A test to see if a file is
3182 sparse is to look at the number blocks allocated for it versus the
3183 number of characters in the file; if there are fewer blocks allocated
3184 for the file than would normally be allocated for a file of that size,
3185 then the file is sparse.  This is the method `tar' uses to detect a
3186 sparse file, and once such a file is detected, it is treated
3187 differently from non-sparse files.
3188
3189    Sparse files are often `dbm' files, or other database-type files
3190 which have data at some points and emptiness in the greater part of the
3191 file.  Such files can appear to be very large when an `ls -l' is done
3192 on them, when in truth, there may be a very small amount of important
3193 data contained in the file.  It is thus undesirable to have `tar' think
3194 that it must back up this entire file, as great quantities of room are
3195 wasted on empty blocks, which can lead to running out of room on a tape
3196 far earlier than is necessary.  Thus, sparse files are dealt with so
3197 that these empty blocks are not written to the tape.  Instead, what is
3198 written to the tape is a description, of sorts, of the sparse file:
3199 where the holes are, how big the holes are, and how much data is found
3200 at the end of the hole.  This way, the file takes up potentially far
3201 less room on the tape, and when the file is extracted later on, it will
3202 look exactly the way it looked beforehand.  The following is a
3203 description of the fields used to handle a sparse file:
3204
3205    The `sp' is an array of `struct sparse'.  Each `struct sparse'
3206 contains two 12-character strings which represent an offset into the
3207 file and a number of bytes to be written at that offset.  The offset is
3208 absolute, and not relative to the offset in preceding array element.
3209
3210    The header can hold four of these `struct sparse' at the moment; if
3211 more are needed, they are not stored in the header.
3212
3213    The `isextended' flag is set when an `extended_header' is needed to
3214 deal with a file.  Note that this means that this flag can only be set
3215 when dealing with a sparse file, and it is only set in the event that
3216 the description of the file will not fit in the allotted room for
3217 sparse structures in the header.  In other words, an extended_header is
3218 needed.
3219
3220    The `extended_header' structure is used for sparse files which need
3221 more sparse structures than can fit in the header.  The header can fit
3222 4 such structures; if more are needed, the flag `isextended' gets set
3223 and the next block is an `extended_header'.
3224
3225    Each `extended_header' structure contains an array of 21 sparse
3226 structures, along with a similar `isextended' flag that the header had.
3227 There can be an indeterminate number of such `extended_header's to
3228 describe a sparse file.
3229
3230 `REGTYPE'
3231 `AREGTYPE'
3232      These flags represent a regular file.  In order to be compatible
3233      with older versions of `tar', a `typeflag' value of `AREGTYPE'
3234      should be silently recognized as a regular file.  New archives
3235      should be created using `REGTYPE'.  Also, for backward
3236      compatibility, `tar' treats a regular file whose name ends with a
3237      slash as a directory.
3238
3239 `LNKTYPE'
3240      This flag represents a file linked to another file, of any type,
3241      previously archived.  Such files are identified in Unix by each
3242      file having the same device and inode number.  The linked-to name
3243      is specified in the `linkname' field with a trailing null.
3244
3245 `SYMTYPE'
3246      This represents a symbolic link to another file.  The linked-to
3247      name is specified in the `linkname' field with a trailing null.
3248
3249 `CHRTYPE'
3250 `BLKTYPE'
3251      These represent character special files and block special files
3252      respectively.  In this case the `devmajor' and `devminor' fields
3253      will contain the major and minor device numbers respectively.
3254      Operating systems may map the device specifications to their own
3255      local specification, or may ignore the entry.
3256
3257 `DIRTYPE'
3258      This flag specifies a directory or sub-directory.  The directory
3259      name in the `name' field should end with a slash.  On systems where
3260      disk allocation is performed on a directory basis, the `size' field
3261      will contain the maximum number of bytes (which may be rounded to
3262      the nearest disk block allocation unit) which the directory may
3263      hold.  A `size' field of zero indicates no such limiting.  Systems
3264      which do not support limiting in this manner should ignore the
3265      `size' field.
3266
3267 `FIFOTYPE'
3268      This specifies a FIFO special file.  Note that the archiving of a
3269      FIFO file archives the existence of this file and not its contents.
3270
3271 `CONTTYPE'
3272      This specifies a contiguous file, which is the same as a normal
3273      file except that, in operating systems which support it, all its
3274      space is allocated contiguously on the disk.  Operating systems
3275      which do not allow contiguous allocation should silently treat this
3276      type as a normal file.
3277
3278 `A' ... `Z'
3279      These are reserved for custom implementations.  Some of these are
3280      used in the GNU modified format, as described below.
3281
3282
3283    Other values are reserved for specification in future revisions of
3284 the P1003 standard, and should not be used by any `tar' program.
3285
3286    The `magic' field indicates that this archive was output in the
3287 P1003 archive format.  If this field contains `TMAGIC', the `uname' and
3288 `gname' fields will contain the ASCII representation of the owner and
3289 group of the file respectively.  If found, the user and group IDs are
3290 used rather than the values in the `uid' and `gid' fields.
3291
3292    For references, see ISO/IEC 9945-1:1990 or IEEE Std 1003.1-1990,
3293 pages 169-173 (section 10.1) for `Archive/Interchange File Format'; and
3294 IEEE Std 1003.2-1992, pages 380-388 (section 4.48) and pages 936-940
3295 (section E.4.48) for `pax - Portable archive interchange'.
3296
3297 \1f
3298 File: tar.info,  Node: Extensions,  Next: Sparse Formats,  Prev: Standard,  Up: Tar Internals
3299
3300 GNU Extensions to the Archive Format
3301 ====================================
3302
3303      _(This message will disappear, once this node revised.)_
3304
3305 The GNU format uses additional file types to describe new types of
3306 files in an archive.  These are listed below.
3307
3308 `GNUTYPE_DUMPDIR'
3309 `'D''
3310      This represents a directory and a list of files created by the
3311      `--incremental' (`-G') option.  The `size' field gives the total
3312      size of the associated list of files.  Each file name is preceded
3313      by either a `Y' (the file should be in this archive) or an `N'.
3314      (The file is a directory, or is not stored in the archive.)  Each
3315      file name is terminated by a null.  There is an additional null
3316      after the last file name.
3317
3318 `GNUTYPE_MULTIVOL'
3319 `'M''
3320      This represents a file continued from another volume of a
3321      multi-volume archive created with the `--multi-volume' (`-M')
3322      option.  The original type of the file is not given here.  The
3323      `size' field gives the maximum size of this piece of the file
3324      (assuming the volume does not end before the file is written out).
3325      The `offset' field gives the offset from the beginning of the file
3326      where this part of the file begins.  Thus `size' plus `offset'
3327      should equal the original size of the file.
3328
3329 `GNUTYPE_SPARSE'
3330 `'S''
3331      This flag indicates that we are dealing with a sparse file.  Note
3332      that archiving a sparse file requires special operations to find
3333      holes in the file, which mark the positions of these holes, along
3334      with the number of bytes of data to be found after the hole.
3335
3336 `GNUTYPE_VOLHDR'
3337 `'V''
3338      This file type is used to mark the volume header that was given
3339      with the `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') option when
3340      the archive was created.  The `name' field contains the `name'
3341      given after the `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL')
3342      option.  The `size' field is zero.  Only the first file in each
3343      volume of an archive should have this type.
3344
3345
3346    You may have trouble reading a GNU format archive on a non-GNU
3347 system if the options `--incremental' (`-G'), `--multi-volume' (`-M'),
3348 `--sparse' (`-S'), or `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') were
3349 used when writing the archive.  In general, if `tar' does not use the
3350 GNU-added fields of the header, other versions of `tar' should be able
3351 to read the archive.  Otherwise, the `tar' program will give an error,
3352 the most likely one being a checksum error.
3353
3354 \1f
3355 File: tar.info,  Node: Sparse Formats,  Next: Snapshot Files,  Prev: Extensions,  Up: Tar Internals
3356
3357 Storing Sparse Files
3358 ====================
3359
3360 The notion of sparse file, and the ways of handling it from the point
3361 of view of GNU `tar' user have been described in detail in *note
3362 sparse::.  This chapter describes the internal format GNU `tar' uses to
3363 store such files.
3364
3365    The support for sparse files in GNU `tar' has a long history.  The
3366 earliest version featuring this support that I was able to find was
3367 1.09, released in November, 1990.  The format introduced back then is
3368 called "old GNU" sparse format and in spite of the fact that its design
3369 contained many flaws, it was the only format GNU `tar' supported until
3370 version 1.14 (May, 2004), which introduced initial support for sparse
3371 archives in PAX archives (*note posix::).  This format was not free
3372 from design flows, either and it was subsequently improved in versions
3373 1.15.2 (November, 2005) and 1.15.92 (June, 2006).
3374
3375    In addition to GNU sparse format, GNU `tar' is able to read and
3376 extract sparse files archived by `star'.
3377
3378    The following subsections describe each format in detail.
3379
3380 * Menu:
3381
3382 * Old GNU Format::
3383 * PAX 0::                PAX Format, Versions 0.0 and 0.1
3384 * PAX 1::                PAX Format, Version 1.0
3385
3386 \1f
3387 File: tar.info,  Node: Old GNU Format,  Next: PAX 0,  Up: Sparse Formats
3388
3389 D.0.1 Old GNU Format
3390 --------------------
3391
3392 The format introduced some time around 1990 (v. 1.09).  It was designed
3393 on top of standard `ustar' headers in such an unfortunate way that some
3394 of its fields overwrote fields required by POSIX.
3395
3396    An old GNU sparse header is designated by type `S'
3397 (`GNUTYPE_SPARSE') and has the following layout:
3398
3399 Offset  Size    Name           Data type      Contents
3400 ---------------------------------------------------------------------------- 
3401 0       345                    N/A            Not used.
3402 345     12      atime          Number         `atime' of the file.
3403 357     12      ctime          Number         `ctime' of the file .
3404 369     12      offset         Number         For multivolume archives:
3405                                               the offset of the start of
3406                                               this volume.
3407 381     4                      N/A            Not used.
3408 385     1                      N/A            Not used.
3409 386     96      sp             `sparse_header'(4 entries) File map.
3410 482     1       isextended     Bool           `1' if an extension sparse
3411                                               header follows, `0'
3412                                               otherwise.
3413 483     12      realsize       Number         Real size of the file.
3414
3415    Each of `sparse_header' object at offset 386 describes a single data
3416 chunk. It has the following structure:
3417
3418 Offset  Size    Data type      Contents
3419 --------------------------------------------------------------------------- 
3420 0       12      Number         Offset of the beginning of the chunk.
3421 12      12      Number         Size of the chunk.
3422
3423    If the member contains more than four chunks, the `isextended' field
3424 of the header has the value `1' and the main header is followed by one
3425 or more "extension headers".  Each such header has the following
3426 structure:
3427
3428 Offset  Size    Name           Data type      Contents
3429 ---------------------------------------------------------------------------- 
3430 0       21      sp             `sparse_header' (21 entires) File map.
3431 504     1       isextended     Bool           `1' if an extension sparse
3432                                               header follows, or `0'
3433                                               otherwise.
3434
3435    A header with `isextended=0' ends the map.
3436
3437 \1f
3438 File: tar.info,  Node: PAX 0,  Next: PAX 1,  Prev: Old GNU Format,  Up: Sparse Formats
3439
3440 D.0.2 PAX Format, Versions 0.0 and 0.1
3441 --------------------------------------
3442
3443 There are two formats available in this branch.  The version `0.0' is
3444 the initial version of sparse format used by `tar' versions
3445 1.14-1.15.1.  The sparse file map is kept in extended (`x') PAX header
3446 variables:
3447
3448 `GNU.sparse.size'
3449      Real size of the stored file
3450
3451 `GNU.sparse.numblocks'
3452      Number of blocks in the sparse map
3453
3454 `GNU.sparse.offset'
3455      Offset of the data block
3456
3457 `GNU.sparse.numbytes'
3458      Size of the data block
3459
3460    The latter two variables repeat for each data block, so the overall
3461 structure is like this:
3462
3463      GNU.sparse.size=SIZE
3464      GNU.sparse.numblocks=NUMBLOCKS
3465      repeat NUMBLOCKS times
3466        GNU.sparse.offset=OFFSET
3467        GNU.sparse.numbytes=NUMBYTES
3468      end repeat
3469
3470    This format presented the following two problems:
3471
3472   1. Whereas the POSIX specification allows a variable to appear
3473      multiple times in a header, it requires that only the last
3474      occurrence be meaningful.  Thus, multiple occurrences of
3475      `GNU.sparse.offset' and `GNU.sparse.numbytes' are conflicting with
3476      the POSIX specs.
3477
3478   2. Attempting to extract such archives using a third-party `tar's
3479      results in extraction of sparse files in _compressed form_.  If
3480      the `tar' implementation in question does not support POSIX
3481      format, it will also extract a file containing extension header
3482      attributes.  This file can be used to expand the file to its
3483      original state.  However, posix-aware `tar's will usually ignore
3484      the unknown variables, which makes restoring the file more
3485      difficult.  *Note Extraction of sparse members in v.0.0 format:
3486      extracting sparse v.0.x, for the detailed description of how to
3487      restore such members using non-GNU `tar's.
3488
3489    GNU `tar' 1.15.2 introduced sparse format version `0.1', which
3490 attempted to solve these problems.  As its predecessor, this format
3491 stores sparse map in the extended POSIX header.  It retains
3492 `GNU.sparse.size' and `GNU.sparse.numblocks' variables, but instead of
3493 `GNU.sparse.offset'/`GNU.sparse.numbytes' pairs it uses a single
3494 variable:
3495
3496 `GNU.sparse.map'
3497      Map of non-null data chunks.  It is a string consisting of
3498      comma-separated values "OFFSET,SIZE[,OFFSET-1,SIZE-1...]"
3499
3500    To address the 2nd problem, the `name' field in `ustar' is replaced
3501 with a special name, constructed using the following pattern:
3502
3503      %d/GNUSparseFile.%p/%f
3504
3505    The real name of the sparse file is stored in the variable
3506 `GNU.sparse.name'.  Thus, those `tar' implementations that are not
3507 aware of GNU extensions will at least extract the files into separate
3508 directories, giving the user a possibility to expand it afterwards.
3509 *Note Extraction of sparse members in v.0.1 format: extracting sparse
3510 v.0.x, for the detailed description of how to restore such members
3511 using non-GNU `tar's.
3512
3513    The resulting `GNU.sparse.map' string can be _very_ long.  Although
3514 POSIX does not impose any limit on the length of a `x' header variable,
3515 this possibly can confuse some tars.
3516
3517 \1f
3518 File: tar.info,  Node: PAX 1,  Prev: PAX 0,  Up: Sparse Formats
3519
3520 D.0.3 PAX Format, Version 1.0
3521 -----------------------------
3522
3523 The version `1.0' of sparse format was introduced with GNU `tar'
3524 1.15.92.  Its main objective was to make the resulting file extractable
3525 with little effort even by non-posix aware `tar' implementations.
3526 Starting from this version, the extended header preceding a sparse
3527 member always contains the following variables that identify the format
3528 being used:
3529
3530 `GNU.sparse.major'
3531      Major version
3532
3533 `GNU.sparse.minor'
3534      Minor version
3535
3536    The `name' field in `ustar' header contains a special name,
3537 constructed using the following pattern:
3538
3539      %d/GNUSparseFile.%p/%f
3540
3541    The real name of the sparse file is stored in the variable
3542 `GNU.sparse.name'.  The real size of the file is stored in the variable
3543 `GNU.sparse.realsize'.
3544
3545    The sparse map itself is stored in the file data block, preceding
3546 the actual file data.  It consists of a series of octal numbers of
3547 arbitrary length, delimited by newlines. The map is padded with nulls
3548 to the nearest block boundary.
3549
3550    The first number gives the number of entries in the map. Following
3551 are map entries, each one consisting of two numbers giving the offset
3552 and size of the data block it describes.
3553
3554    The format is designed in such a way that non-posix aware tars and
3555 tars not supporting `GNU.sparse.*' keywords will extract each sparse
3556 file in its condensed form with the file map prepended and will place it
3557 into a separate directory.  Then, using a simple program it would be
3558 possible to expand the file to its original form even without GNU `tar'.
3559 *Note Sparse Recovery::, for the detailed information on how to extract
3560 sparse members without GNU `tar'.
3561
3562 \1f
3563 File: tar.info,  Node: Snapshot Files,  Next: Dumpdir,  Prev: Sparse Formats,  Up: Tar Internals
3564
3565 Format of the Incremental Snapshot Files
3566 ========================================
3567
3568 A "snapshot file" (or "directory file") is created during incremental
3569 backups (*note Incremental Dumps::).  It contains the status of the
3570 file system at the time of the dump and is used to determine which
3571 files were modified since the last backup.
3572
3573    GNU `tar' version 1.22 supports three snapshot file formats.  The
3574 first format, called "format 0", is the one used by GNU `tar' versions
3575 up to 1.15.1. The second format, called "format 1" is an extended
3576 version of this format, that contains more metadata and allows for
3577 further extensions. It was used by version 1.15.1. Starting from
3578 version 1.16 and up to 1.22, the "format 2" is used.
3579
3580    GNU `tar' is able to read all three formats, but will create
3581 snapshots only in format 2.
3582
3583    This appendix describes all three formats in detail.
3584
3585   0.   `Format 0' snapshot file begins with a line containing a decimal
3586      number that represents a UNIX timestamp of the beginning of the
3587      last archivation. This line is followed by directory metadata
3588      descriptions, one per line. Each description has the following
3589      format:
3590
3591           NFSDEV INODE NAME
3592
3593      where:
3594
3595     NFS
3596           A single plus character (`+'), if this directory is located on
3597           an NFS-mounted partition, or a single space otherwise;
3598
3599     DEV
3600           Device number of the directory;
3601
3602     INODE
3603           I-node number of the directory;
3604
3605     NAME
3606           Name of the directory. Any special characters (white-space,
3607           backslashes, etc.) are quoted.
3608
3609   1.   `Format 1' snapshot file begins with a line specifying the
3610      format of the file. This line has the following structure:
3611
3612           `GNU tar-'TAR-VERSION`-'INCR-FORMAT-VERSION
3613
3614      where TAR-VERSION is the version number of GNU `tar'
3615      implementation that created this snapshot, and INCR-FORMAT-VERSION
3616      is the version number of the snapshot format (in this case `1').
3617
3618      Next line contains two decimal numbers, representing the time of
3619      the last backup. First number is the number of seconds, the second
3620      one is the number of nanoseconds, since the beginning of the epoch.
3621
3622      Lines that follow contain directory metadata, one line per
3623      directory. Each line is formatted as follows:
3624
3625           [NFS]MTIME-SEC MTIME-NSEC DEV INODE NAME
3626
3627      where MTIME-SEC and MTIME-NSEC represent last modification time of
3628      this directory with nanosecond precision; NFS, DEV, INODE and NAME
3629      have the same meaning as with `format 0'.
3630
3631   2.    A snapshot file begins with a format identifier, as described
3632      for version 1, e.g.:
3633
3634           GNU tar-1.22-2
3635
3636      This line is followed by newline. Rest of file consists of
3637      records, separated by null (ASCII 0) characters. Thus, in contrast
3638      to the previous formats, format 2 snapshot is a binary file.
3639
3640      First two records are decimal numbers, representing the time of
3641      the last backup.  First number is the number of seconds, the
3642      second one is the number of nanoseconds, since the beginning of the
3643      epoch.  These are followed by arbitrary number of directory
3644      records.
3645
3646      Each "directory record" contains a set of metadata describing a
3647      particular directory.  Parts of a directory record are delimited
3648      with ASCII 0 characters.  The following table describes each part.
3649      The "Number" type in this table stands for a decimal number in
3650      ASCII notation.
3651
3652      Field         Type          Description
3653      --------------------------------------------------------------------- 
3654      nfs           Character     `1' if the directory is located on an
3655                                  NFS-mounted partition, or `0' otherwise;
3656      mtime-sec     Number        Modification time, seconds;
3657      mtime-nano    Number        Modification time, nanoseconds;
3658      dev-no        Number        Device number;
3659      i-no          Number        I-node number;
3660      name          String        Directory name; In contrast to the
3661                                  previous versions it is not quoted.
3662      contents      Dumpdir       Contents of the directory; *Note
3663                                  Dumpdir::, for a description of its
3664                                  format.
3665
3666
3667      Dumpdirs stored in snapshot files contain only records of types
3668      `Y', `N' and `D'.
3669
3670
3671 \1f
3672 File: tar.info,  Node: Dumpdir,  Prev: Snapshot Files,  Up: Tar Internals
3673
3674 Dumpdir
3675 =======
3676
3677 Incremental archives keep information about contents of each dumped
3678 directory in special data blocks called "dumpdirs".
3679
3680    Dumpdir is a sequence of entries of the following form:
3681
3682      C FILENAME \0
3683
3684 where C is one of the "control codes" described below, FILENAME is the
3685 name of the file C operates upon, and `\0' represents a nul character
3686 (ASCII 0).  The white space characters were added for readability, real
3687 dumpdirs do not contain them.
3688
3689    Each dumpdir ends with a single nul character.
3690
3691    The following table describes control codes and their meanings:
3692
3693 `Y'
3694      FILENAME is contained in the archive.
3695
3696 `N'
3697      FILENAME was present in the directory at the time the archive was
3698      made, yet it was not dumped to the archive, because it had not
3699      changed since the last backup.
3700
3701 `D'
3702      FILENAME is a directory.
3703
3704 `R'
3705      This code requests renaming of the FILENAME to the name specified
3706      with the `T' command, that immediately follows it.
3707
3708 `T'
3709      Specify target file name for `R' command (see below).
3710
3711 `X'
3712      Specify "temporary directory" name for a rename operation (see
3713      below).
3714
3715    Codes `Y', `N' and `D' require FILENAME argument to be a relative
3716 file name to the directory this dumpdir describes, whereas codes `R',
3717 `T' and `X' require their argument to be an absolute file name.
3718
3719    The three codes `R', `T' and `X' specify a "renaming operation".  In
3720 the simplest case it is:
3721
3722      R`source'\0T`dest'\0
3723
3724 which means "rename file `source' to file `dest'".
3725
3726    However, there are cases that require using a "temporary directory".
3727 For example, consider the following scenario:
3728
3729   1. Previous run dumped a directory `foo' which contained the
3730      following three directories:
3731
3732           a
3733           b
3734           c
3735
3736   2. They were renamed _cyclically_, so that:
3737
3738           `a' became `b'
3739           `b' became `c'
3740           `c' became `a'
3741
3742   3. New incremental dump was made.
3743
3744    This case cannot be handled by three successive renames, since
3745 renaming `a' to `b' will destroy the existing directory.  To correctly
3746 process it, GNU `tar' needs a temporary directory, so it creates the
3747 following dumpdir (newlines have been added for readability):
3748
3749      Xfoo\0
3750      Rfoo/a\0T\0
3751      Rfoo/b\0Tfoo/c\0
3752      Rfoo/c\0Tfoo/a\0
3753      R\0Tfoo/a\0
3754
3755    The first command, `Xfoo\0', instructs the extractor to create a
3756 temporary directory in the directory `foo'.  Second command,
3757 `Rfoo/aT\0', says "rename file `foo/a' to the temporary directory that
3758 has just been created" (empty file name after a command means use
3759 temporary directory).  Third and fourth commands work as usual, and,
3760 finally, the last command, `R\0Tfoo/a\0' tells tar to rename the
3761 temporary directory to `foo/a'.
3762
3763    The exact placement of a dumpdir in the archive depends on the
3764 archive format (*note Formats::):
3765
3766    * PAX archives
3767
3768      In PAX archives, dumpdir is stored in the extended header of the
3769      corresponding directory, in variable `GNU.dumpdir'.
3770
3771    * GNU and old GNU archives
3772
3773      These formats implement special header type `D', which is similar
3774      to ustar header `5' (directory), except that it precedes a data
3775      block containing the dumpdir.
3776
3777 \1f
3778 File: tar.info,  Node: Genfile,  Next: Free Software Needs Free Documentation,  Prev: Tar Internals,  Up: Top
3779
3780 Appendix E Genfile
3781 ******************
3782
3783 This appendix describes `genfile', an auxiliary program used in the GNU
3784 tar testsuite. If you are not interested in developing GNU tar, skip
3785 this appendix.
3786
3787    Initially, `genfile' was used to generate data files for the
3788 testsuite, hence its name. However, new operation modes were being
3789 implemented as the testsuite grew more sophisticated, and now `genfile'
3790 is a multi-purpose instrument.
3791
3792    There are three basic operation modes:
3793
3794 File Generation
3795      This is the default mode. In this mode, `genfile' generates data
3796      files.
3797
3798 File Status
3799      In this mode `genfile' displays status of specified files.
3800
3801 Synchronous Execution.
3802      In this mode `genfile' executes the given program with
3803      `--checkpoint' option and executes a set of actions when specified
3804      checkpoints are reached.
3805
3806 * Menu:
3807
3808 * Generate Mode::     File Generation Mode.
3809 * Status Mode::       File Status Mode.
3810 * Exec Mode::         Synchronous Execution mode.
3811
3812 \1f
3813 File: tar.info,  Node: Generate Mode,  Next: Status Mode,  Up: Genfile
3814
3815 E.1 Generate Mode
3816 =================
3817
3818 In this mode `genfile' creates a data file for the test suite. The size
3819 of the file is given with the `--length' (`-l') option. By default the
3820 file contents is written to the standard output, this can be changed
3821 using `--file' (`-f') command line option. Thus, the following two
3822 commands are equivalent:
3823
3824      genfile --length 100 > outfile
3825      genfile --length 100 --file outfile
3826
3827    If `--length' is not given, `genfile' will generate an empty
3828 (zero-length) file.
3829
3830    The command line option `--seek=N' istructs `genfile' to skip the
3831 given number of bytes (N) in the output file before writing to it.  It
3832 is similar to the `seek=N' of the `dd' utility.
3833
3834    You can instruct `genfile' to create several files at one go, by
3835 giving it `--files-from' (`-T') option followed by a name of file
3836 containing a list of file names. Using dash (`-') instead of the file
3837 name causes `genfile' to read file list from the standard input. For
3838 example:
3839
3840      # Read file names from file `file.list'
3841      genfile --files-from file.list
3842      # Read file names from standard input
3843      genfile --files-from -
3844
3845    The list file is supposed to contain one file name per line. To use
3846 file lists separated by ASCII NUL character, use `--null' (`-0')
3847 command line option:
3848
3849      genfile --null --files-from file.list
3850
3851    The default data pattern for filling the generated file consists of
3852 first 256 letters of ASCII code, repeated enough times to fill the
3853 entire file. This behavior can be changed with `--pattern' option. This
3854 option takes a mandatory argument, specifying pattern name to use.
3855 Currently two patterns are implemented:
3856
3857 `--pattern=default'
3858      The default pattern as described above.
3859
3860 `--pattern=zero'
3861      Fills the file with zeroes.
3862
3863    If no file name was given, the program exits with the code `0'.
3864 Otherwise, it exits with `0' only if it was able to create a file of
3865 the specified length.
3866
3867    Special option `--sparse' (`-s') instructs `genfile' to create a
3868 sparse file. Sparse files consist of "data fragments", separated by
3869 "holes" or blocks of zeros. On many operating systems, actual disk
3870 storage is not allocated for holes, but they are counted in the length
3871 of the file. To create a sparse file, `genfile' should know where to
3872 put data fragments, and what data to use to fill them. So, when
3873 `--sparse' is given the rest of the command line specifies a so-called
3874 "file map".
3875
3876    The file map consists of any number of "fragment descriptors". Each
3877 descriptor is composed of two values: a number, specifying fragment
3878 offset from the end of the previous fragment or, for the very first
3879 fragment, from the beginning of the file, and "contents string", i.e.,
3880 a string of characters, specifying the pattern to fill the fragment
3881 with. File offset can be suffixed with the following quantifiers:
3882
3883 `k'
3884 `K'
3885      The number is expressed in kilobytes.
3886
3887 `m'
3888 `M'
3889      The number is expressed in megabytes.
3890
3891 `g'
3892 `G'
3893      The number is expressed in gigabytes.
3894
3895    For each letter in contents string `genfile' will generate a "block"
3896 of data, filled with this letter and will write it to the fragment. The
3897 size of block is given by `--block-size' option. It defaults to 512.
3898 Thus, if the string consists of N characters, the resulting file
3899 fragment will contain `N*BLOCK-SIZE' of data.
3900
3901    Last fragment descriptor can have only file offset part. In this
3902 case `genfile' will create a hole at the end of the file up to the
3903 given offset.
3904
3905    For example, consider the following invocation:
3906
3907      genfile --sparse --file sparsefile 0 ABCD 1M EFGHI 2000K
3908
3909 It will create 3101184-bytes long file of the following structure:
3910
3911 Offset                    Length         Contents
3912 0                         4*512=2048     Four 512-byte blocks, filled
3913                                          with letters `A', `B', `C' and
3914                                          `D'.
3915 2048                      1046528        Zero bytes
3916 1050624                   5*512=2560     Five blocks, filled with letters
3917                                          `E', `F', `G', `H', `I'.
3918 1053184                   2048000        Zero bytes
3919
3920    The exit code of `genfile --status' command is `0' only if created
3921 file is actually sparse.
3922
3923 \1f
3924 File: tar.info,  Node: Status Mode,  Next: Exec Mode,  Prev: Generate Mode,  Up: Genfile
3925
3926 E.2 Status Mode
3927 ===============
3928
3929 In status mode, `genfile' prints file system status for each file
3930 specified in the command line. This mode is toggled by `--stat' (`-S')
3931 command line option. An optional argument to this option specifies
3932 output "format": a comma-separated list of `struct stat' fields to be
3933 displayed. This list can contain following identifiers :
3934
3935 name
3936      The file name.
3937
3938 dev
3939 st_dev
3940      Device number in decimal.
3941
3942 ino
3943 st_ino
3944      Inode number.
3945
3946 mode[.NUMBER]
3947 st_mode[.NUMBER]
3948      File mode in octal.  Optional NUMBER specifies octal mask to be
3949      applied to the mode before outputting.  For example, `--stat
3950      mode.777' will preserve lower nine bits of it.  Notice, that you
3951      can use any punctuation character in place of `.'.
3952
3953 nlink
3954 st_nlink
3955      Number of hard links.
3956
3957 uid
3958 st_uid
3959      User ID of owner.
3960
3961 gid
3962 st_gid
3963      Group ID of owner.
3964
3965 size
3966 st_size
3967      File size in decimal.
3968
3969 blksize
3970 st_blksize
3971      The size in bytes of each file block.
3972
3973 blocks
3974 st_blocks
3975      Number of blocks allocated.
3976
3977 atime
3978 st_atime
3979      Time of last access.
3980
3981 mtime
3982 st_mtime
3983      Time of last modification
3984
3985 ctime
3986 st_ctime
3987      Time of last status change
3988
3989 sparse
3990      A boolean value indicating whether the file is `sparse'.
3991
3992    Modification times are displayed in UTC as UNIX timestamps, unless
3993 suffixed with `H' (for "human-readable"), as in `ctimeH', in which case
3994 usual `tar tv' output format is used.
3995
3996    The default output format is: `name,dev,ino,mode,
3997 nlink,uid,gid,size,blksize,blocks,atime,mtime,ctime'.
3998
3999    For example, the following command will display file names and
4000 corresponding times of last access for each file in the current working
4001 directory:
4002
4003      genfile --stat=name,atime *
4004
4005 \1f
4006 File: tar.info,  Node: Exec Mode,  Prev: Status Mode,  Up: Genfile
4007
4008 E.3 Exec Mode
4009 =============
4010
4011 This mode is designed for testing the behavior of `paxutils' commands
4012 when some of the files change during archiving. It is an experimental
4013 mode.
4014
4015    The `Exec Mode' is toggled by `--run' command line option (or its
4016 alias `-r'). The argument to this option gives the command line to be
4017 executed. The actual command line is constructed by inserting
4018 `--checkpoint' option between the command name and its first argument
4019 (if any). Due to this, the argument to `--run' may not use traditional
4020 `tar' option syntax, i.e., the following is wrong:
4021
4022      # Wrong!
4023      genfile --run 'tar cf foo bar'
4024
4025 Use the following syntax instead:
4026
4027      genfile --run 'tar -cf foo bar'
4028
4029    The rest of command line after `--run' or its equivalent specifies
4030 checkpoint values and actions to be executed upon reaching them.
4031 Checkpoint values are introduced with `--checkpoint' command line
4032 option. Argument to this option is the number of checkpoint in decimal.
4033
4034    Any number of "actions" may be specified after a checkpoint.
4035 Available actions are
4036
4037 `--cut FILE'
4038 `--truncate FILE'
4039      Truncate FILE to the size specified by previous `--length' option
4040      (or 0, if it is not given).
4041
4042 `--append FILE'
4043      Append data to FILE. The size of data and its pattern are given by
4044      previous `--length' and `pattern' options.
4045
4046 `--touch FILE'
4047      Update the access and modification times of FILE. These timestamps
4048      are changed to the current time, unless `--date' option was given,
4049      in which case they are changed to the specified time. Argument to
4050      `--date' option is a date specification in an almost arbitrary
4051      format (*note Date input formats::).
4052
4053 `--exec COMMAND'
4054      Execute given shell command.
4055
4056
4057    Option `--verbose' instructs `genfile' to print on standard output
4058 notifications about checkpoints being executed and to verbosely
4059 describe exit status of the command.
4060
4061    While the command is being executed its standard output remains
4062 connected to descriptor 1. All messages it prints to file descriptor 2,
4063 except checkpoint notifications, are forwarded to standard error.
4064
4065    `Genfile' exits with the exit status of the executed command.
4066
4067 \1f
4068 File: tar.info,  Node: Free Software Needs Free Documentation,  Next: Copying This Manual,  Prev: Genfile,  Up: Top
4069
4070 Appendix F Free Software Needs Free Documentation
4071 *************************************************
4072
4073 The biggest deficiency in the free software community today is not in
4074 the software--it is the lack of good free documentation that we can
4075 include with the free software.  Many of our most important programs do
4076 not come with free reference manuals and free introductory texts.
4077 Documentation is an essential part of any software package; when an
4078 important free software package does not come with a free manual and a
4079 free tutorial, that is a major gap.  We have many such gaps today.
4080
4081    Consider Perl, for instance.  The tutorial manuals that people
4082 normally use are non-free.  How did this come about?  Because the
4083 authors of those manuals published them with restrictive terms--no
4084 copying, no modification, source files not available--which exclude
4085 them from the free software world.
4086
4087    That wasn't the first time this sort of thing happened, and it was
4088 far from the last.  Many times we have heard a GNU user eagerly
4089 describe a manual that he is writing, his intended contribution to the
4090 community, only to learn that he had ruined everything by signing a
4091 publication contract to make it non-free.
4092
4093    Free documentation, like free software, is a matter of freedom, not
4094 price.  The problem with the non-free manual is not that publishers
4095 charge a price for printed copies--that in itself is fine.  (The Free
4096 Software Foundation sells printed copies of manuals, too.)  The problem
4097 is the restrictions on the use of the manual.  Free manuals are
4098 available in source code form, and give you permission to copy and
4099 modify.  Non-free manuals do not allow this.
4100
4101    The criteria of freedom for a free manual are roughly the same as for
4102 free software.  Redistribution (including the normal kinds of
4103 commercial redistribution) must be permitted, so that the manual can
4104 accompany every copy of the program, both on-line and on paper.
4105
4106    Permission for modification of the technical content is crucial too.
4107 When people modify the software, adding or changing features, if they
4108 are conscientious they will change the manual too--so they can provide
4109 accurate and clear documentation for the modified program.  A manual
4110 that leaves you no choice but to write a new manual to document a
4111 changed version of the program is not really available to our community.
4112
4113    Some kinds of limits on the way modification is handled are
4114 acceptable.  For example, requirements to preserve the original
4115 author's copyright notice, the distribution terms, or the list of
4116 authors, are ok.  It is also no problem to require modified versions to
4117 include notice that they were modified.  Even entire sections that may
4118 not be deleted or changed are acceptable, as long as they deal with
4119 nontechnical topics (like this one).  These kinds of restrictions are
4120 acceptable because they don't obstruct the community's normal use of
4121 the manual.
4122
4123    However, it must be possible to modify all the _technical_ content
4124 of the manual, and then distribute the result in all the usual media,
4125 through all the usual channels.  Otherwise, the restrictions obstruct
4126 the use of the manual, it is not free, and we need another manual to
4127 replace it.
4128
4129    Please spread the word about this issue.  Our community continues to
4130 lose manuals to proprietary publishing.  If we spread the word that
4131 free software needs free reference manuals and free tutorials, perhaps
4132 the next person who wants to contribute by writing documentation will
4133 realize, before it is too late, that only free manuals contribute to
4134 the free software community.
4135
4136    If you are writing documentation, please insist on publishing it
4137 under the GNU Free Documentation License or another free documentation
4138 license.  Remember that this decision requires your approval--you don't
4139 have to let the publisher decide.  Some commercial publishers will use
4140 a free license if you insist, but they will not propose the option; it
4141 is up to you to raise the issue and say firmly that this is what you
4142 want.  If the publisher you are dealing with refuses, please try other
4143 publishers.  If you're not sure whether a proposed license is free,
4144 write to <licensing@gnu.org>.
4145
4146    You can encourage commercial publishers to sell more free, copylefted
4147 manuals and tutorials by buying them, and particularly by buying copies
4148 from the publishers that paid for their writing or for major
4149 improvements.  Meanwhile, try to avoid buying non-free documentation at
4150 all.  Check the distribution terms of a manual before you buy it, and
4151 insist that whoever seeks your business must respect your freedom.
4152 Check the history of the book, and try reward the publishers that have
4153 paid or pay the authors to work on it.
4154
4155    The Free Software Foundation maintains a list of free documentation
4156 published by other publishers, at
4157 `http://www.fsf.org/doc/other-free-books.html'.
4158
4159 \1f
4160 File: tar.info,  Node: Copying This Manual,  Next: Index of Command Line Options,  Prev: Free Software Needs Free Documentation,  Up: Top
4161
4162 Appendix G Copying This Manual
4163 ******************************
4164
4165 * Menu:
4166
4167 * GNU Free Documentation License::  License for copying this manual
4168
4169 \1f
4170 File: tar.info,  Node: GNU Free Documentation License,  Up: Copying This Manual
4171
4172 G.1 GNU Free Documentation License
4173 ==================================
4174
4175                       Version 1.2, November 2002
4176
4177      Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
4178      51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
4179
4180      Everyone is permitted to copy and distribute verbatim copies
4181      of this license document, but changing it is not allowed.
4182
4183   0. PREAMBLE
4184
4185      The purpose of this License is to make a manual, textbook, or other
4186      functional and useful document "free" in the sense of freedom: to
4187      assure everyone the effective freedom to copy and redistribute it,
4188      with or without modifying it, either commercially or
4189      noncommercially.  Secondarily, this License preserves for the
4190      author and publisher a way to get credit for their work, while not
4191      being considered responsible for modifications made by others.
4192
4193      This License is a kind of "copyleft", which means that derivative
4194      works of the document must themselves be free in the same sense.
4195      It complements the GNU General Public License, which is a copyleft
4196      license designed for free software.
4197
4198      We have designed this License in order to use it for manuals for
4199      free software, because free software needs free documentation: a
4200      free program should come with manuals providing the same freedoms
4201      that the software does.  But this License is not limited to
4202      software manuals; it can be used for any textual work, regardless
4203      of subject matter or whether it is published as a printed book.
4204      We recommend this License principally for works whose purpose is
4205      instruction or reference.
4206
4207   1. APPLICABILITY AND DEFINITIONS
4208
4209      This License applies to any manual or other work, in any medium,
4210      that contains a notice placed by the copyright holder saying it
4211      can be distributed under the terms of this License.  Such a notice
4212      grants a world-wide, royalty-free license, unlimited in duration,
4213      to use that work under the conditions stated herein.  The
4214      "Document", below, refers to any such manual or work.  Any member
4215      of the public is a licensee, and is addressed as "you".  You
4216      accept the license if you copy, modify or distribute the work in a
4217      way requiring permission under copyright law.
4218
4219      A "Modified Version" of the Document means any work containing the
4220      Document or a portion of it, either copied verbatim, or with
4221      modifications and/or translated into another language.
4222
4223      A "Secondary Section" is a named appendix or a front-matter section
4224      of the Document that deals exclusively with the relationship of the
4225      publishers or authors of the Document to the Document's overall
4226      subject (or to related matters) and contains nothing that could
4227      fall directly within that overall subject.  (Thus, if the Document
4228      is in part a textbook of mathematics, a Secondary Section may not
4229      explain any mathematics.)  The relationship could be a matter of
4230      historical connection with the subject or with related matters, or
4231      of legal, commercial, philosophical, ethical or political position
4232      regarding them.
4233
4234      The "Invariant Sections" are certain Secondary Sections whose
4235      titles are designated, as being those of Invariant Sections, in
4236      the notice that says that the Document is released under this
4237      License.  If a section does not fit the above definition of
4238      Secondary then it is not allowed to be designated as Invariant.
4239      The Document may contain zero Invariant Sections.  If the Document
4240      does not identify any Invariant Sections then there are none.
4241
4242      The "Cover Texts" are certain short passages of text that are
4243      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
4244      that says that the Document is released under this License.  A
4245      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
4246      be at most 25 words.
4247
4248      A "Transparent" copy of the Document means a machine-readable copy,
4249      represented in a format whose specification is available to the
4250      general public, that is suitable for revising the document
4251      straightforwardly with generic text editors or (for images
4252      composed of pixels) generic paint programs or (for drawings) some
4253      widely available drawing editor, and that is suitable for input to
4254      text formatters or for automatic translation to a variety of
4255      formats suitable for input to text formatters.  A copy made in an
4256      otherwise Transparent file format whose markup, or absence of
4257      markup, has been arranged to thwart or discourage subsequent
4258      modification by readers is not Transparent.  An image format is
4259      not Transparent if used for any substantial amount of text.  A
4260      copy that is not "Transparent" is called "Opaque".
4261
4262      Examples of suitable formats for Transparent copies include plain
4263      ASCII without markup, Texinfo input format, LaTeX input format,
4264      SGML or XML using a publicly available DTD, and
4265      standard-conforming simple HTML, PostScript or PDF designed for
4266      human modification.  Examples of transparent image formats include
4267      PNG, XCF and JPG.  Opaque formats include proprietary formats that
4268      can be read and edited only by proprietary word processors, SGML or
4269      XML for which the DTD and/or processing tools are not generally
4270      available, and the machine-generated HTML, PostScript or PDF
4271      produced by some word processors for output purposes only.
4272
4273      The "Title Page" means, for a printed book, the title page itself,
4274      plus such following pages as are needed to hold, legibly, the
4275      material this License requires to appear in the title page.  For
4276      works in formats which do not have any title page as such, "Title
4277      Page" means the text near the most prominent appearance of the
4278      work's title, preceding the beginning of the body of the text.
4279
4280      A section "Entitled XYZ" means a named subunit of the Document
4281      whose title either is precisely XYZ or contains XYZ in parentheses
4282      following text that translates XYZ in another language.  (Here XYZ
4283      stands for a specific section name mentioned below, such as
4284      "Acknowledgements", "Dedications", "Endorsements", or "History".)
4285      To "Preserve the Title" of such a section when you modify the
4286      Document means that it remains a section "Entitled XYZ" according
4287      to this definition.
4288
4289      The Document may include Warranty Disclaimers next to the notice
4290      which states that this License applies to the Document.  These
4291      Warranty Disclaimers are considered to be included by reference in
4292      this License, but only as regards disclaiming warranties: any other
4293      implication that these Warranty Disclaimers may have is void and
4294      has no effect on the meaning of this License.
4295
4296   2. VERBATIM COPYING
4297
4298      You may copy and distribute the Document in any medium, either
4299      commercially or noncommercially, provided that this License, the
4300      copyright notices, and the license notice saying this License
4301      applies to the Document are reproduced in all copies, and that you
4302      add no other conditions whatsoever to those of this License.  You
4303      may not use technical measures to obstruct or control the reading
4304      or further copying of the copies you make or distribute.  However,
4305      you may accept compensation in exchange for copies.  If you
4306      distribute a large enough number of copies you must also follow
4307      the conditions in section 3.
4308
4309      You may also lend copies, under the same conditions stated above,
4310      and you may publicly display copies.
4311
4312   3. COPYING IN QUANTITY
4313
4314      If you publish printed copies (or copies in media that commonly
4315      have printed covers) of the Document, numbering more than 100, and
4316      the Document's license notice requires Cover Texts, you must
4317      enclose the copies in covers that carry, clearly and legibly, all
4318      these Cover Texts: Front-Cover Texts on the front cover, and
4319      Back-Cover Texts on the back cover.  Both covers must also clearly
4320      and legibly identify you as the publisher of these copies.  The
4321      front cover must present the full title with all words of the
4322      title equally prominent and visible.  You may add other material
4323      on the covers in addition.  Copying with changes limited to the
4324      covers, as long as they preserve the title of the Document and
4325      satisfy these conditions, can be treated as verbatim copying in
4326      other respects.
4327
4328      If the required texts for either cover are too voluminous to fit
4329      legibly, you should put the first ones listed (as many as fit
4330      reasonably) on the actual cover, and continue the rest onto
4331      adjacent pages.
4332
4333      If you publish or distribute Opaque copies of the Document
4334      numbering more than 100, you must either include a
4335      machine-readable Transparent copy along with each Opaque copy, or
4336      state in or with each Opaque copy a computer-network location from
4337      which the general network-using public has access to download
4338      using public-standard network protocols a complete Transparent
4339      copy of the Document, free of added material.  If you use the
4340      latter option, you must take reasonably prudent steps, when you
4341      begin distribution of Opaque copies in quantity, to ensure that
4342      this Transparent copy will remain thus accessible at the stated
4343      location until at least one year after the last time you
4344      distribute an Opaque copy (directly or through your agents or
4345      retailers) of that edition to the public.
4346
4347      It is requested, but not required, that you contact the authors of
4348      the Document well before redistributing any large number of
4349      copies, to give them a chance to provide you with an updated
4350      version of the Document.
4351
4352   4. MODIFICATIONS
4353
4354      You may copy and distribute a Modified Version of the Document
4355      under the conditions of sections 2 and 3 above, provided that you
4356      release the Modified Version under precisely this License, with
4357      the Modified Version filling the role of the Document, thus
4358      licensing distribution and modification of the Modified Version to
4359      whoever possesses a copy of it.  In addition, you must do these
4360      things in the Modified Version:
4361
4362        A. Use in the Title Page (and on the covers, if any) a title
4363           distinct from that of the Document, and from those of
4364           previous versions (which should, if there were any, be listed
4365           in the History section of the Document).  You may use the
4366           same title as a previous version if the original publisher of
4367           that version gives permission.
4368
4369        B. List on the Title Page, as authors, one or more persons or
4370           entities responsible for authorship of the modifications in
4371           the Modified Version, together with at least five of the
4372           principal authors of the Document (all of its principal
4373           authors, if it has fewer than five), unless they release you
4374           from this requirement.
4375
4376        C. State on the Title page the name of the publisher of the
4377           Modified Version, as the publisher.
4378
4379        D. Preserve all the copyright notices of the Document.
4380
4381        E. Add an appropriate copyright notice for your modifications
4382           adjacent to the other copyright notices.
4383
4384        F. Include, immediately after the copyright notices, a license
4385           notice giving the public permission to use the Modified
4386           Version under the terms of this License, in the form shown in
4387           the Addendum below.
4388
4389        G. Preserve in that license notice the full lists of Invariant
4390           Sections and required Cover Texts given in the Document's
4391           license notice.
4392
4393        H. Include an unaltered copy of this License.
4394
4395        I. Preserve the section Entitled "History", Preserve its Title,
4396           and add to it an item stating at least the title, year, new
4397           authors, and publisher of the Modified Version as given on
4398           the Title Page.  If there is no section Entitled "History" in
4399           the Document, create one stating the title, year, authors,
4400           and publisher of the Document as given on its Title Page,
4401           then add an item describing the Modified Version as stated in
4402           the previous sentence.
4403
4404        J. Preserve the network location, if any, given in the Document
4405           for public access to a Transparent copy of the Document, and
4406           likewise the network locations given in the Document for
4407           previous versions it was based on.  These may be placed in
4408           the "History" section.  You may omit a network location for a
4409           work that was published at least four years before the
4410           Document itself, or if the original publisher of the version
4411           it refers to gives permission.
4412
4413        K. For any section Entitled "Acknowledgements" or "Dedications",
4414           Preserve the Title of the section, and preserve in the
4415           section all the substance and tone of each of the contributor
4416           acknowledgements and/or dedications given therein.
4417
4418        L. Preserve all the Invariant Sections of the Document,
4419           unaltered in their text and in their titles.  Section numbers
4420           or the equivalent are not considered part of the section
4421           titles.
4422
4423        M. Delete any section Entitled "Endorsements".  Such a section
4424           may not be included in the Modified Version.
4425
4426        N. Do not retitle any existing section to be Entitled
4427           "Endorsements" or to conflict in title with any Invariant
4428           Section.
4429
4430        O. Preserve any Warranty Disclaimers.
4431
4432      If the Modified Version includes new front-matter sections or
4433      appendices that qualify as Secondary Sections and contain no
4434      material copied from the Document, you may at your option
4435      designate some or all of these sections as invariant.  To do this,
4436      add their titles to the list of Invariant Sections in the Modified
4437      Version's license notice.  These titles must be distinct from any
4438      other section titles.
4439
4440      You may add a section Entitled "Endorsements", provided it contains
4441      nothing but endorsements of your Modified Version by various
4442      parties--for example, statements of peer review or that the text
4443      has been approved by an organization as the authoritative
4444      definition of a standard.
4445
4446      You may add a passage of up to five words as a Front-Cover Text,
4447      and a passage of up to 25 words as a Back-Cover Text, to the end
4448      of the list of Cover Texts in the Modified Version.  Only one
4449      passage of Front-Cover Text and one of Back-Cover Text may be
4450      added by (or through arrangements made by) any one entity.  If the
4451      Document already includes a cover text for the same cover,
4452      previously added by you or by arrangement made by the same entity
4453      you are acting on behalf of, you may not add another; but you may
4454      replace the old one, on explicit permission from the previous
4455      publisher that added the old one.
4456
4457      The author(s) and publisher(s) of the Document do not by this
4458      License give permission to use their names for publicity for or to
4459      assert or imply endorsement of any Modified Version.
4460
4461   5. COMBINING DOCUMENTS
4462
4463      You may combine the Document with other documents released under
4464      this License, under the terms defined in section 4 above for
4465      modified versions, provided that you include in the combination
4466      all of the Invariant Sections of all of the original documents,
4467      unmodified, and list them all as Invariant Sections of your
4468      combined work in its license notice, and that you preserve all
4469      their Warranty Disclaimers.
4470
4471      The combined work need only contain one copy of this License, and
4472      multiple identical Invariant Sections may be replaced with a single
4473      copy.  If there are multiple Invariant Sections with the same name
4474      but different contents, make the title of each such section unique
4475      by adding at the end of it, in parentheses, the name of the
4476      original author or publisher of that section if known, or else a
4477      unique number.  Make the same adjustment to the section titles in
4478      the list of Invariant Sections in the license notice of the
4479      combined work.
4480
4481      In the combination, you must combine any sections Entitled
4482      "History" in the various original documents, forming one section
4483      Entitled "History"; likewise combine any sections Entitled
4484      "Acknowledgements", and any sections Entitled "Dedications".  You
4485      must delete all sections Entitled "Endorsements."
4486
4487   6. COLLECTIONS OF DOCUMENTS
4488
4489      You may make a collection consisting of the Document and other
4490      documents released under this License, and replace the individual
4491      copies of this License in the various documents with a single copy
4492      that is included in the collection, provided that you follow the
4493      rules of this License for verbatim copying of each of the
4494      documents in all other respects.
4495
4496      You may extract a single document from such a collection, and
4497      distribute it individually under this License, provided you insert
4498      a copy of this License into the extracted document, and follow
4499      this License in all other respects regarding verbatim copying of
4500      that document.
4501
4502   7. AGGREGATION WITH INDEPENDENT WORKS
4503
4504      A compilation of the Document or its derivatives with other
4505      separate and independent documents or works, in or on a volume of
4506      a storage or distribution medium, is called an "aggregate" if the
4507      copyright resulting from the compilation is not used to limit the
4508      legal rights of the compilation's users beyond what the individual
4509      works permit.  When the Document is included in an aggregate, this
4510      License does not apply to the other works in the aggregate which
4511      are not themselves derivative works of the Document.
4512
4513      If the Cover Text requirement of section 3 is applicable to these
4514      copies of the Document, then if the Document is less than one half
4515      of the entire aggregate, the Document's Cover Texts may be placed
4516      on covers that bracket the Document within the aggregate, or the
4517      electronic equivalent of covers if the Document is in electronic
4518      form.  Otherwise they must appear on printed covers that bracket
4519      the whole aggregate.
4520
4521   8. TRANSLATION
4522
4523      Translation is considered a kind of modification, so you may
4524      distribute translations of the Document under the terms of section
4525      4.  Replacing Invariant Sections with translations requires special
4526      permission from their copyright holders, but you may include
4527      translations of some or all Invariant Sections in addition to the
4528      original versions of these Invariant Sections.  You may include a
4529      translation of this License, and all the license notices in the
4530      Document, and any Warranty Disclaimers, provided that you also
4531      include the original English version of this License and the
4532      original versions of those notices and disclaimers.  In case of a
4533      disagreement between the translation and the original version of
4534      this License or a notice or disclaimer, the original version will
4535      prevail.
4536
4537      If a section in the Document is Entitled "Acknowledgements",
4538      "Dedications", or "History", the requirement (section 4) to
4539      Preserve its Title (section 1) will typically require changing the
4540      actual title.
4541
4542   9. TERMINATION
4543
4544      You may not copy, modify, sublicense, or distribute the Document
4545      except as expressly provided for under this License.  Any other
4546      attempt to copy, modify, sublicense or distribute the Document is
4547      void, and will automatically terminate your rights under this
4548      License.  However, parties who have received copies, or rights,
4549      from you under this License will not have their licenses
4550      terminated so long as such parties remain in full compliance.
4551
4552  10. FUTURE REVISIONS OF THIS LICENSE
4553
4554      The Free Software Foundation may publish new, revised versions of
4555      the GNU Free Documentation License from time to time.  Such new
4556      versions will be similar in spirit to the present version, but may
4557      differ in detail to address new problems or concerns.  See
4558      `http://www.gnu.org/copyleft/'.
4559
4560      Each version of the License is given a distinguishing version
4561      number.  If the Document specifies that a particular numbered
4562      version of this License "or any later version" applies to it, you
4563      have the option of following the terms and conditions either of
4564      that specified version or of any later version that has been
4565      published (not as a draft) by the Free Software Foundation.  If
4566      the Document does not specify a version number of this License,
4567      you may choose any version ever published (not as a draft) by the
4568      Free Software Foundation.
4569
4570 G.1.1 ADDENDUM: How to use this License for your documents
4571 ----------------------------------------------------------
4572
4573 To use this License in a document you have written, include a copy of
4574 the License in the document and put the following copyright and license
4575 notices just after the title page:
4576
4577        Copyright (C)  YEAR  YOUR NAME.
4578        Permission is granted to copy, distribute and/or modify this document
4579        under the terms of the GNU Free Documentation License, Version 1.2
4580        or any later version published by the Free Software Foundation;
4581        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
4582        Texts.  A copy of the license is included in the section entitled ``GNU
4583        Free Documentation License''.
4584
4585    If you have Invariant Sections, Front-Cover Texts and Back-Cover
4586 Texts, replace the "with...Texts." line with this:
4587
4588          with the Invariant Sections being LIST THEIR TITLES, with
4589          the Front-Cover Texts being LIST, and with the Back-Cover Texts
4590          being LIST.
4591
4592    If you have Invariant Sections without Cover Texts, or some other
4593 combination of the three, merge those two alternatives to suit the
4594 situation.
4595
4596    If your document contains nontrivial examples of program code, we
4597 recommend releasing these examples in parallel under your choice of
4598 free software license, such as the GNU General Public License, to
4599 permit their use in free software.
4600
4601 \1f
4602 File: tar.info,  Node: Index of Command Line Options,  Next: Index,  Prev: Copying This Manual,  Up: Top
4603
4604 Appendix H Index of Command Line Options
4605 ****************************************
4606
4607 This appendix contains an index of all GNU `tar' long command line
4608 options. The options are listed without the preceding double-dash.  For
4609 a cross-reference of short command line options, *note Short Option
4610 Summary::.
4611
4612 \0\b[index\0\b]
4613 * Menu:
4614
4615 * absolute-names:                        absolute.            (line   8)
4616 * absolute-names, summary:               Option Summary.      (line   6)
4617 * add-file:                              files.               (line  84)
4618 * after-date:                            after.               (line  26)
4619 * after-date, summary:                   Option Summary.      (line  12)
4620 * anchored:                              controlling pattern-matching.
4621                                                               (line  79)
4622 * anchored, summary:                     Option Summary.      (line  15)
4623 * append:                                append.              (line   8)
4624 * append, summary:                       Operation Summary.   (line   6)
4625 * atime-preserve:                        Attributes.          (line  14)
4626 * atime-preserve, summary:               Option Summary.      (line  19)
4627 * auto-compress:                         gzip.                (line  76)
4628 * auto-compress, summary:                Option Summary.      (line  65)
4629 * backup:                                backup.              (line  41)
4630 * backup, summary:                       Option Summary.      (line  71)
4631 * block-number:                          verbose.             (line 115)
4632 * block-number, summary:                 Option Summary.      (line  76)
4633 * blocking-factor:                       Blocking Factor.     (line   8)
4634 * blocking-factor, summary:              Option Summary.      (line  82)
4635 * bzip2:                                 gzip.                (line 131)
4636 * bzip2, summary:                        Option Summary.      (line  87)
4637 * catenate:                              concatenate.         (line   6)
4638 * catenate, summary:                     Operation Summary.   (line  10)
4639 * check-device, described:               Incremental Dumps.   (line  99)
4640 * check-device, summary:                 Option Summary.      (line  92)
4641 * check-links, described:                hard links.          (line  33)
4642 * check-links, summary:                  Option Summary.      (line 143)
4643 * checkpoint:                            checkpoints.         (line   6)
4644 * checkpoint, defined:                   checkpoints.         (line  13)
4645 * checkpoint, summary:                   Option Summary.      (line  97)
4646 * checkpoint-action:                     checkpoints.         (line   6)
4647 * checkpoint-action, defined:            checkpoints.         (line  22)
4648 * checkpoint-action, summary:            Option Summary.      (line 105)
4649 * compare:                               compare.             (line   8)
4650 * compare, summary:                      Operation Summary.   (line  14)
4651 * compress:                              gzip.                (line 145)
4652 * compress, summary:                     Option Summary.      (line 152)
4653 * concatenate:                           concatenate.         (line   6)
4654 * concatenate, summary:                  Operation Summary.   (line  20)
4655 * confirmation, summary:                 Option Summary.      (line 159)
4656 * create, additional options:            create options.      (line   6)
4657 * create, complementary notes:           Basic tar.           (line  11)
4658 * create, introduced:                    Creating the archive.
4659                                                               (line   6)
4660 * create, summary:                       Operation Summary.   (line  25)
4661 * create, using with --verbose:          create verbose.      (line   6)
4662 * create, using with --verify:           verify.              (line  24)
4663 * delay-directory-restore:               Directory Modification Times and Permissions.
4664                                                               (line  62)
4665 * delay-directory-restore, summary:      Option Summary.      (line 162)
4666 * delete:                                delete.              (line   8)
4667 * delete, summary:                       Operation Summary.   (line  29)
4668 * dereference:                           dereference.         (line   6)
4669 * dereference, summary:                  Option Summary.      (line 167)
4670 * diff, summary:                         Operation Summary.   (line  33)
4671 * directory:                             directory.           (line  11)
4672 * directory, summary:                    Option Summary.      (line 173)
4673 * directory, using in --files-from argument: files.           (line  60)
4674 * exclude:                               exclude.             (line  11)
4675 * exclude, potential problems with:      problems with exclude.
4676                                                               (line   6)
4677 * exclude, summary:                      Option Summary.      (line 180)
4678 * exclude-caches:                        exclude.             (line  96)
4679 * exclude-caches, summary:               Option Summary.      (line 189)
4680 * exclude-caches-all:                    exclude.             (line 104)
4681 * exclude-caches-all, summary:           Option Summary.      (line 202)
4682 * exclude-caches-under:                  exclude.             (line 100)
4683 * exclude-caches-under, summary:         Option Summary.      (line 196)
4684 * exclude-from:                          exclude.             (line  22)
4685 * exclude-from, summary:                 Option Summary.      (line 184)
4686 * exclude-tag:                           exclude.             (line 113)
4687 * exclude-tag, summary:                  Option Summary.      (line 206)
4688 * exclude-tag-all:                       exclude.             (line 121)
4689 * exclude-tag-all, summary:              Option Summary.      (line 214)
4690 * exclude-tag-under:                     exclude.             (line 117)
4691 * exclude-tag-under, summary:            Option Summary.      (line 210)
4692 * exclude-vcs:                           exclude.             (line  39)
4693 * exclude-vcs, summary:                  Option Summary.      (line 218)
4694 * extract:                               extract.             (line   8)
4695 * extract, additional options:           extract options.     (line   8)
4696 * extract, complementary notes:          Basic tar.           (line  48)
4697 * extract, summary:                      Operation Summary.   (line  37)
4698 * extract, using with --listed-incremental: Incremental Dumps.
4699                                                               (line 112)
4700 * file, short description:               file.                (line  17)
4701 * file, summary:                         Option Summary.      (line 224)
4702 * file, tutorial:                        file tutorial.       (line   6)
4703 * files-from:                            files.               (line  14)
4704 * files-from, summary:                   Option Summary.      (line 230)
4705 * force-local, short description:        Device.              (line  70)
4706 * force-local, summary:                  Option Summary.      (line 236)
4707 * format, summary:                       Option Summary.      (line 241)
4708 * get, summary:                          Operation Summary.   (line  42)
4709 * group:                                 override.            (line  73)
4710 * group, summary:                        Option Summary.      (line 266)
4711 * gunzip, summary:                       Option Summary.      (line 274)
4712 * gzip:                                  gzip.                (line  97)
4713 * gzip, summary:                         Option Summary.      (line 274)
4714 * hard-dereference, described:           hard links.          (line  61)
4715 * hard-dereference, summary:             Option Summary.      (line 282)
4716 * help:                                  help tutorial.       (line   6)
4717 * help, introduction:                    help.                (line  26)
4718 * help, summary:                         Option Summary.      (line 288)
4719 * ignore-case:                           controlling pattern-matching.
4720                                                               (line  86)
4721 * ignore-case, summary:                  Option Summary.      (line 293)
4722 * ignore-command-error:                  Writing to an External Program.
4723                                                               (line  82)
4724 * ignore-command-error, summary:         Option Summary.      (line 297)
4725 * ignore-failed-read:                    Ignore Failed Read.  (line   7)
4726 * ignore-failed-read, summary:           Option Summary.      (line 301)
4727 * ignore-zeros:                          Ignore Zeros.        (line   6)
4728 * ignore-zeros, short description:       Blocking Factor.     (line 156)
4729 * ignore-zeros, summary:                 Option Summary.      (line 305)
4730 * incremental, summary:                  Option Summary.      (line 310)
4731 * incremental, using with --list:        Incremental Dumps.   (line 177)
4732 * index-file, summary:                   Option Summary.      (line 317)
4733 * info-script:                           Multi-Volume Archives.
4734                                                               (line  80)
4735 * info-script, short description:        Device.              (line 104)
4736 * info-script, summary:                  Option Summary.      (line 320)
4737 * interactive:                           interactive.         (line  14)
4738 * interactive, summary:                  Option Summary.      (line 328)
4739 * keep-newer-files:                      Keep Newer Files.    (line   6)
4740 * keep-newer-files, summary:             Option Summary.      (line 335)
4741 * keep-old-files:                        Keep Old Files.      (line   6)
4742 * keep-old-files, introduced:            Dealing with Old Files.
4743                                                               (line  16)
4744 * keep-old-files, summary:               Option Summary.      (line 339)
4745 * label:                                 label.               (line   8)
4746 * label, summary:                        Option Summary.      (line 344)
4747 * list:                                  list.                (line   6)
4748 * list, summary:                         Operation Summary.   (line  46)
4749 * list, using with --incremental:        Incremental Dumps.   (line 177)
4750 * list, using with --listed-incremental: Incremental Dumps.   (line 177)
4751 * list, using with --verbose:            list.                (line  30)
4752 * list, using with file name arguments:  list.                (line  68)
4753 * listed-incremental:                    Incremental Dumps.   (line  14)
4754 * listed-incremental, summary:           Option Summary.      (line 351)
4755 * listed-incremental, using with --extract: Incremental Dumps.
4756                                                               (line 112)
4757 * listed-incremental, using with --list: Incremental Dumps.   (line 177)
4758 * lzma:                                  gzip.                (line 139)
4759 * lzma, summary:                         Option Summary.      (line 359)
4760 * lzop:                                  gzip.                (line 142)
4761 * mode:                                  override.            (line  14)
4762 * mode, summary:                         Option Summary.      (line 367)
4763 * mtime:                                 override.            (line  29)
4764 * mtime, summary:                        Option Summary.      (line 373)
4765 * multi-volume:                          Multi-Volume Archives.
4766                                                               (line   6)
4767 * multi-volume, short description:       Device.              (line  88)
4768 * multi-volume, summary:                 Option Summary.      (line 382)
4769 * new-volume-script:                     Multi-Volume Archives.
4770                                                               (line  80)
4771 * new-volume-script, short description:  Device.              (line 104)
4772 * new-volume-script, summary:            Option Summary.      (line 320)
4773 * newer:                                 after.               (line  26)
4774 * newer, summary:                        Option Summary.      (line 390)
4775 * newer-mtime:                           after.               (line  37)
4776 * newer-mtime, summary:                  Option Summary.      (line 398)
4777 * no-anchored:                           controlling pattern-matching.
4778                                                               (line  79)
4779 * no-anchored, summary:                  Option Summary.      (line 403)
4780 * no-auto-compress, summary:             Option Summary.      (line 407)
4781 * no-check-device, described:            Incremental Dumps.   (line  95)
4782 * no-check-device, summary:              Option Summary.      (line 411)
4783 * no-delay-directory-restore:            Directory Modification Times and Permissions.
4784                                                               (line  68)
4785 * no-delay-directory-restore, summary:   Option Summary.      (line 416)
4786 * no-ignore-case:                        controlling pattern-matching.
4787                                                               (line  86)
4788 * no-ignore-case, summary:               Option Summary.      (line 422)
4789 * no-ignore-command-error:               Writing to an External Program.
4790                                                               (line  87)
4791 * no-ignore-command-error, summary:      Option Summary.      (line 425)
4792 * no-null, described:                    nul.                 (line  15)
4793 * no-null, summary:                      Option Summary.      (line 429)
4794 * no-overwrite-dir, summary:             Option Summary.      (line 434)
4795 * no-quote-chars, summary:               Option Summary.      (line 438)
4796 * no-recursion:                          recurse.             (line  13)
4797 * no-recursion, summary:                 Option Summary.      (line 443)
4798 * no-same-owner:                         Attributes.          (line  67)
4799 * no-same-owner, summary:                Option Summary.      (line 447)
4800 * no-same-permissions, summary:          Option Summary.      (line 453)
4801 * no-unquote:                            Selecting Archive Members.
4802                                                               (line  42)
4803 * no-unquote, summary:                   Option Summary.      (line 458)
4804 * no-wildcards:                          controlling pattern-matching.
4805                                                               (line  41)
4806 * no-wildcards, summary:                 Option Summary.      (line 462)
4807 * no-wildcards-match-slash:              controlling pattern-matching.
4808                                                               (line  92)
4809 * no-wildcards-match-slash, summary:     Option Summary.      (line 465)
4810 * null, described:                       nul.                 (line  11)
4811 * null, summary:                         Option Summary.      (line 468)
4812 * numeric-owner:                         Attributes.          (line  73)
4813 * numeric-owner, summary:                Option Summary.      (line 474)
4814 * occurrence, summary:                   Option Summary.      (line 491)
4815 * old-archive, summary:                  Option Summary.      (line 505)
4816 * one-file-system:                       one.                 (line  16)
4817 * one-file-system, summary:              Option Summary.      (line 508)
4818 * overwrite:                             Overwrite Old Files. (line   6)
4819 * overwrite, introduced:                 Dealing with Old Files.
4820                                                               (line  22)
4821 * overwrite, summary:                    Option Summary.      (line 513)
4822 * overwrite-dir:                         Overwrite Old Files. (line  28)
4823 * overwrite-dir, introduced:             Dealing with Old Files.
4824                                                               (line   6)
4825 * overwrite-dir, summary:                Option Summary.      (line 517)
4826 * owner:                                 override.            (line  57)
4827 * owner, summary:                        Option Summary.      (line 521)
4828 * pax-option:                            PAX keywords.        (line   6)
4829 * pax-option, summary:                   Option Summary.      (line 530)
4830 * portability, summary:                  Option Summary.      (line 536)
4831 * posix, summary:                        Option Summary.      (line 540)
4832 * preserve:                              Attributes.          (line 126)
4833 * preserve, summary:                     Option Summary.      (line 543)
4834 * preserve-order:                        Same Order.          (line   6)
4835 * preserve-order, summary:               Option Summary.      (line 547)
4836 * preserve-permissions:                  Setting Access Permissions.
4837                                                               (line  10)
4838 * preserve-permissions, short description: Attributes.        (line 113)
4839 * preserve-permissions, summary:         Option Summary.      (line 550)
4840 * quote-chars, summary:                  Option Summary.      (line 560)
4841 * quoting-style:                         quoting styles.      (line  38)
4842 * quoting-style, summary:                Option Summary.      (line 564)
4843 * read-full-records <1>:                 read full records.   (line   6)
4844 * read-full-records:                     Reading.             (line   8)
4845 * read-full-records, short description:  Blocking Factor.     (line 172)
4846 * read-full-records, summary:            Option Summary.      (line 571)
4847 * record-size, summary:                  Option Summary.      (line 576)
4848 * recursion:                             recurse.             (line  24)
4849 * recursion, summary:                    Option Summary.      (line 580)
4850 * recursive-unlink:                      Recursive Unlink.    (line   6)
4851 * recursive-unlink, summary:             Option Summary.      (line 584)
4852 * remove-files:                          remove files.        (line   6)
4853 * remove-files, summary:                 Option Summary.      (line 589)
4854 * restrict, summary:                     Option Summary.      (line 593)
4855 * rmt-command, summary:                  Option Summary.      (line 598)
4856 * rsh-command:                           Device.              (line  73)
4857 * rsh-command, summary:                  Option Summary.      (line 602)
4858 * same-order:                            Same Order.          (line   6)
4859 * same-order, summary:                   Option Summary.      (line 606)
4860 * same-owner:                            Attributes.          (line  48)
4861 * same-owner, summary:                   Option Summary.      (line 614)
4862 * same-permissions:                      Setting Access Permissions.
4863                                                               (line  10)
4864 * same-permissions, short description:   Attributes.          (line 113)
4865 * same-permissions, summary:             Option Summary.      (line 550)
4866 * seek, summary:                         Option Summary.      (line 623)
4867 * show-defaults:                         defaults.            (line   6)
4868 * show-defaults, summary:                Option Summary.      (line 630)
4869 * show-omitted-dirs:                     verbose.             (line 107)
4870 * show-omitted-dirs, summary:            Option Summary.      (line 639)
4871 * show-stored-names:                     list.                (line  60)
4872 * show-stored-names, summary:            Option Summary.      (line 643)
4873 * show-transformed-names:                transform.           (line  45)
4874 * show-transformed-names, summary:       Option Summary.      (line 643)
4875 * sparse:                                sparse.              (line  22)
4876 * sparse, summary:                       Option Summary.      (line 651)
4877 * sparse-version:                        sparse.              (line  57)
4878 * sparse-version, summary:               Option Summary.      (line 656)
4879 * starting-file:                         Starting File.       (line   6)
4880 * starting-file, summary:                Option Summary.      (line 661)
4881 * strip-components:                      transform.           (line  25)
4882 * strip-components, summary:             Option Summary.      (line 667)
4883 * suffix:                                backup.              (line  68)
4884 * suffix, summary:                       Option Summary.      (line 676)
4885 * tape-length:                           Multi-Volume Archives.
4886                                                               (line  33)
4887 * tape-length, short description:        Device.              (line  96)
4888 * tape-length, summary:                  Option Summary.      (line 682)
4889 * test-label:                            label.               (line  37)
4890 * test-label, summary:                   Option Summary.      (line 687)
4891 * to-command:                            Writing to an External Program.
4892                                                               (line   9)
4893 * to-command, summary:                   Option Summary.      (line 691)
4894 * to-stdout:                             Writing to Standard Output.
4895                                                               (line  14)
4896 * to-stdout, summary:                    Option Summary.      (line 695)
4897 * totals:                                verbose.             (line  46)
4898 * totals, summary:                       Option Summary.      (line 700)
4899 * touch <1>:                             Attributes.          (line  37)
4900 * touch:                                 Data Modification Times.
4901                                                               (line  15)
4902 * touch, summary:                        Option Summary.      (line 705)
4903 * transform:                             transform.           (line  74)
4904 * transform, summary:                    Option Summary.      (line 711)
4905 * uncompress:                            gzip.                (line 145)
4906 * uncompress, summary:                   Option Summary.      (line 152)
4907 * ungzip:                                gzip.                (line  97)
4908 * ungzip, summary:                       Option Summary.      (line 274)
4909 * unlink-first:                          Unlink First.        (line   6)
4910 * unlink-first, introduced:              Dealing with Old Files.
4911                                                               (line  42)
4912 * unlink-first, summary:                 Option Summary.      (line 731)
4913 * unquote:                               Selecting Archive Members.
4914                                                               (line  39)
4915 * unquote, summary:                      Option Summary.      (line 737)
4916 * update:                                update.              (line   8)
4917 * update, summary:                       Operation Summary.   (line  50)
4918 * usage:                                 help.                (line  53)
4919 * use-compress-program:                  gzip.                (line 150)
4920 * use-compress-program, summary:         Option Summary.      (line 741)
4921 * utc, summary:                          Option Summary.      (line 746)
4922 * verbose:                               verbose.             (line  18)
4923 * verbose, introduced:                   verbose tutorial.    (line   6)
4924 * verbose, summary:                      Option Summary.      (line 750)
4925 * verbose, using with --create:          create verbose.      (line   6)
4926 * verbose, using with --list:            list.                (line  30)
4927 * verify, short description:             verify.              (line   8)
4928 * verify, summary:                       Option Summary.      (line 757)
4929 * verify, using with --create:           verify.              (line  24)
4930 * version:                               help.                (line   6)
4931 * version, summary:                      Option Summary.      (line 762)
4932 * volno-file:                            Multi-Volume Archives.
4933                                                               (line  71)
4934 * volno-file, summary:                   Option Summary.      (line 767)
4935 * wildcards:                             controlling pattern-matching.
4936                                                               (line  38)
4937 * wildcards, summary:                    Option Summary.      (line 772)
4938 * wildcards-match-slash:                 controlling pattern-matching.
4939                                                               (line  92)
4940 * wildcards-match-slash, summary:        Option Summary.      (line 776)
4941 * xform:                                 transform.           (line  74)
4942 * xform, summary:                        Option Summary.      (line 711)
4943 * xz, summary:                           Option Summary.      (line 779)
4944
4945 \1f
4946 File: tar.info,  Node: Index,  Prev: Index of Command Line Options,  Up: Top
4947
4948 Appendix I Index
4949 ****************
4950
4951 \0\b[index\0\b]
4952 * Menu:
4953
4954 * abbreviations for months:              Calendar date items. (line  38)
4955 * absolute file names:                   Remote Tape Server.  (line  17)
4956 * Adding archives to an archive:         concatenate.         (line   6)
4957 * Adding files to an Archive:            appending files.     (line   8)
4958 * ADMINISTRATOR:                         General-Purpose Variables.
4959                                                               (line   7)
4960 * Age, excluding files by:               after.               (line   8)
4961 * ago in date strings:                   Relative items in date strings.
4962                                                               (line  23)
4963 * am in date strings:                    Time of day items.   (line  22)
4964 * Appending files to an Archive:         appending files.     (line   8)
4965 * Arch, excluding files:                 exclude.             (line  39)
4966 * archive:                               Definitions.         (line   6)
4967 * Archive creation:                      file.                (line  36)
4968 * archive member:                        Definitions.         (line  15)
4969 * Archive Name:                          file.                (line   8)
4970 * Archive, creation of:                  create.              (line   8)
4971 * Archives, Appending files to:          appending files.     (line   8)
4972 * Archiving Directories:                 create dir.          (line   6)
4973 * archiving files:                       Top.                 (line  24)
4974 * ARGP_HELP_FMT, environment variable:   Configuring Help Summary.
4975                                                               (line  21)
4976 * authors of get_date:                   Authors of get_date. (line   6)
4977 * Avoiding recursion in directories:     recurse.             (line   8)
4978 * backup options:                        backup.              (line   6)
4979 * backup suffix:                         backup.              (line  68)
4980 * BACKUP_DIRS:                           General-Purpose Variables.
4981                                                               (line  29)
4982 * BACKUP_FILES:                          General-Purpose Variables.
4983                                                               (line  55)
4984 * BACKUP_HOUR:                           General-Purpose Variables.
4985                                                               (line  11)
4986 * backups:                               backup.              (line  41)
4987 * Bazaar, excluding files:               exclude.             (line  39)
4988 * beginning of time, for POSIX:          Seconds since the Epoch.
4989                                                               (line  13)
4990 * bell, checkpoint action:               checkpoints.         (line  65)
4991 * Bellovin, Steven M.:                   Authors of get_date. (line   6)
4992 * Berets, Jim:                           Authors of get_date. (line   6)
4993 * Berry, K.:                             Authors of get_date. (line  14)
4994 * Block number where error occurred:     verbose.             (line 115)
4995 * BLOCKING:                              General-Purpose Variables.
4996                                                               (line  25)
4997 * blocking factor:                       Blocking Factor.     (line 194)
4998 * Blocking Factor:                       Blocking Factor.     (line   6)
4999 * Blocks per record:                     Blocking Factor.     (line   6)
5000 * bug reports:                           Reports.             (line   6)
5001 * Bytes per record:                      Blocking Factor.     (line   6)
5002 * bzip2:                                 gzip.                (line   6)
5003 * calendar date item:                    Calendar date items. (line   6)
5004 * case, ignored in dates:                General date syntax. (line  64)
5005 * cat vs concatenate:                    concatenate.         (line  63)
5006 * Changing directory mid-stream:         directory.           (line   6)
5007 * Character class, excluding characters from: wildcards.      (line  34)
5008 * checkpoints, defined:                  checkpoints.         (line   6)
5009 * Choosing an archive file:              file.                (line   8)
5010 * comments, in dates:                    General date syntax. (line  64)
5011 * compress:                              gzip.                (line   6)
5012 * Compressed archives:                   gzip.                (line   6)
5013 * concatenate vs cat:                    concatenate.         (line  63)
5014 * Concatenating Archives:                concatenate.         (line   6)
5015 * corrupted archives <1>:                gzip.                (line 116)
5016 * corrupted archives:                    Full Dumps.          (line   8)
5017 * Creation of the archive:               create.              (line   8)
5018 * CVS, excluding files:                  exclude.             (line  39)
5019 * Darcs, excluding files:                exclude.             (line  39)
5020 * DAT blocking:                          Blocking Factor.     (line 204)
5021 * Data Modification time, excluding files by: after.          (line   8)
5022 * Data modification times of extracted files: Data Modification Times.
5023                                                               (line   6)
5024 * date format, ISO 8601:                 Calendar date items. (line  30)
5025 * date input formats:                    Date input formats.  (line   6)
5026 * day in date strings:                   Relative items in date strings.
5027                                                               (line  15)
5028 * day of week item:                      Day of week items.   (line   6)
5029 * Deleting files from an archive:        delete.              (line   8)
5030 * Deleting from tape archives:           delete.              (line  19)
5031 * dereferencing hard links:              hard links.          (line   8)
5032 * Descending directories, avoiding:      recurse.             (line   8)
5033 * Device numbers, changing:              Fixing Snapshot Files.
5034                                                               (line   6)
5035 * Device numbers, using in incremental backups: Incremental Dumps.
5036                                                               (line  81)
5037 * Directories, Archiving:                create dir.          (line   6)
5038 * Directories, avoiding recursion:       recurse.             (line   8)
5039 * Directory, changing mid-stream:        directory.           (line   6)
5040 * DIRLIST:                               General-Purpose Variables.
5041                                                               (line  51)
5042 * displacement of dates:                 Relative items in date strings.
5043                                                               (line   6)
5044 * doc-opt-col:                           Configuring Help Summary.
5045                                                               (line  94)
5046 * dot, checkpoint action:                checkpoints.         (line  80)
5047 * Double-checking a write operation:     verify.              (line   6)
5048 * DUMP_BEGIN:                            User Hooks.          (line  32)
5049 * DUMP_END:                              User Hooks.          (line  36)
5050 * DUMP_REMIND_SCRIPT:                    General-Purpose Variables.
5051                                                               (line 102)
5052 * dumps, full:                           Full Dumps.          (line   8)
5053 * dup-args:                              Configuring Help Summary.
5054                                                               (line  51)
5055 * dup-args-note:                         Configuring Help Summary.
5056                                                               (line  68)
5057 * echo, checkpoint action:               checkpoints.         (line  25)
5058 * Eggert, Paul:                          Authors of get_date. (line   6)
5059 * End-of-archive blocks, ignoring:       Ignore Zeros.        (line   6)
5060 * End-of-archive info script:            Multi-Volume Archives.
5061                                                               (line  80)
5062 * entry:                                 Naming tar Archives. (line  11)
5063 * epoch, for POSIX:                      Seconds since the Epoch.
5064                                                               (line  13)
5065 * Error message, block number of:        verbose.             (line 125)
5066 * Exabyte blocking:                      Blocking Factor.     (line 204)
5067 * exclude:                               exclude.             (line  14)
5068 * exclude-caches:                        exclude.             (line  84)
5069 * exclude-from:                          exclude.             (line  27)
5070 * exclude-tag:                           exclude.             (line 107)
5071 * Excluding characters from a character class: wildcards.     (line  34)
5072 * Excluding file by age:                 after.               (line   8)
5073 * Excluding files by file system:        exclude.             (line   8)
5074 * Excluding files by name and pattern:   exclude.             (line   8)
5075 * Exec Mode, genfile:                    Exec Mode.           (line   6)
5076 * exec, checkpoint action:               checkpoints.         (line  96)
5077 * existing backup method:                backup.              (line  59)
5078 * exit status:                           Synopsis.            (line  67)
5079 * Extraction:                            extract.             (line   8)
5080 * extraction:                            Definitions.         (line  22)
5081 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
5082                                                               (line   6)
5083 * file archival:                         Top.                 (line  24)
5084 * File lists separated by NUL characters: Generate Mode.      (line  33)
5085 * file name:                             Definitions.         (line  15)
5086 * File Name arguments, alternatives:     files.               (line   6)
5087 * File name arguments, using --list with: list.               (line  68)
5088 * File names, excluding files by:        exclude.             (line   8)
5089 * File names, terminated by NUL:         nul.                 (line   6)
5090 * File names, using hard links:          hard links.          (line   8)
5091 * File names, using symbolic links:      dereference.         (line   6)
5092 * File system boundaries, not crossing:  one.                 (line   6)
5093 * FILELIST:                              General-Purpose Variables.
5094                                                               (line  65)
5095 * first in date strings:                 General date syntax. (line  26)
5096 * format 0, snapshot file:               Snapshot Files.      (line  23)
5097 * format 1, snapshot file:               Snapshot Files.      (line  47)
5098 * format 2, snapshot file:               Snapshot Files.      (line  69)
5099 * Format Options:                        Format Variations.   (line   6)
5100 * Format Parameters:                     Format Variations.   (line   6)
5101 * Format, old style:                     old.                 (line   6)
5102 * fortnight in date strings:             Relative items in date strings.
5103                                                               (line  15)
5104 * free documentation:                    Free Software Needs Free Documentation.
5105                                                               (line   6)
5106 * full dumps:                            Full Dumps.          (line   8)
5107 * future time stamps:                    Large or Negative Values.
5108                                                               (line   6)
5109 * general date syntax:                   General date syntax. (line   6)
5110 * Generate Mode, genfile:                Generate Mode.       (line   6)
5111 * genfile:                               Genfile.             (line   6)
5112 * genfile, create file:                  Generate Mode.       (line   6)
5113 * genfile, creating sparse files:        Generate Mode.       (line  55)
5114 * genfile, generate mode:                Generate Mode.       (line   6)
5115 * genfile, reading a list of file names: Generate Mode.       (line  22)
5116 * genfile, seeking to a given offset:    Generate Mode.       (line  18)
5117 * get_date:                              Date input formats.  (line   6)
5118 * Getting program version number:        help.                (line   6)
5119 * git, excluding files:                  exclude.             (line  39)
5120 * GNU archive format:                    gnu.                 (line   6)
5121 * GNU.sparse.major, extended header variable: PAX 1.          (line  14)
5122 * GNU.sparse.map, extended header variable: PAX 0.            (line  60)
5123 * GNU.sparse.minor, extended header variable: PAX 1.          (line  17)
5124 * GNU.sparse.name, extended header variable: PAX 0.           (line  68)
5125 * GNU.sparse.name, extended header variable, in v.1.0: PAX 1. (line  24)
5126 * GNU.sparse.numblocks, extended header variable: PAX 0.      (line  15)
5127 * GNU.sparse.numbytes, extended header variable: PAX 0.       (line  21)
5128 * GNU.sparse.offset, extended header variable: PAX 0.         (line  18)
5129 * GNU.sparse.realsize, extended header variable: PAX 1.       (line  24)
5130 * GNU.sparse.size, extended header variable: PAX 0.           (line  11)
5131 * gnupg, using with tar:                 gzip.                (line 163)
5132 * gpg, using with tar:                   gzip.                (line 163)
5133 * gzip:                                  gzip.                (line   6)
5134 * hard links, dereferencing:             hard links.          (line   8)
5135 * header-col:                            Configuring Help Summary.
5136                                                               (line 140)
5137 * hook:                                  User Hooks.          (line  13)
5138 * hour in date strings:                  Relative items in date strings.
5139                                                               (line  15)
5140 * Ignoring end-of-archive blocks:        Ignore Zeros.        (line   6)
5141 * Info script:                           Multi-Volume Archives.
5142                                                               (line  80)
5143 * Interactive operation:                 interactive.         (line   6)
5144 * ISO 8601 date format:                  Calendar date items. (line  30)
5145 * items in date strings:                 General date syntax. (line   6)
5146 * Labeling an archive:                   label.               (line   6)
5147 * Labeling multi-volume archives:        label.               (line   6)
5148 * Labels on the archive media:           label.               (line   6)
5149 * language, in dates:                    General date syntax. (line  40)
5150 * Large lists of file names on small machines: Same Order.    (line   6)
5151 * large values:                          Large or Negative Values.
5152                                                               (line   6)
5153 * last DAY:                              Day of week items.   (line  15)
5154 * last in date strings:                  General date syntax. (line  26)
5155 * Listing all tar options:               help.                (line  26)
5156 * listing member and file names:         list.                (line  41)
5157 * Listing volume label:                  label.               (line  29)
5158 * Lists of file names:                   files.               (line   6)
5159 * Local and remote archives:             file.                (line  73)
5160 * long-opt-col:                          Configuring Help Summary.
5161                                                               (line  86)
5162 * lzma:                                  gzip.                (line   6)
5163 * lzop:                                  gzip.                (line   6)
5164 * MacKenzie, David:                      Authors of get_date. (line   6)
5165 * member:                                Definitions.         (line  15)
5166 * member name:                           Definitions.         (line  15)
5167 * Members, replacing with other members: append.              (line  49)
5168 * Mercurial, excluding files:            exclude.             (line  39)
5169 * Meyering, Jim:                         Authors of get_date. (line   6)
5170 * Middle of the archive, starting in the: Starting File.      (line  11)
5171 * midnight in date strings:              Time of day items.   (line  22)
5172 * minute in date strings:                Relative items in date strings.
5173                                                               (line  15)
5174 * minutes, time zone correction by:      Time of day items.   (line  30)
5175 * Modes of extracted files:              Setting Access Permissions.
5176                                                               (line   6)
5177 * Modification time, excluding files by: after.               (line   8)
5178 * Modification times of extracted files: Data Modification Times.
5179                                                               (line   6)
5180 * month in date strings:                 Relative items in date strings.
5181                                                               (line  15)
5182 * month names in date strings:           Calendar date items. (line  38)
5183 * months, written-out:                   General date syntax. (line  36)
5184 * MT:                                    General-Purpose Variables.
5185                                                               (line  69)
5186 * MT_BEGIN:                              Magnetic Tape Control.
5187                                                               (line  11)
5188 * MT_OFFLINE:                            Magnetic Tape Control.
5189                                                               (line  32)
5190 * MT_REWIND:                             Magnetic Tape Control.
5191                                                               (line  21)
5192 * MT_STATUS:                             Magnetic Tape Control.
5193                                                               (line  42)
5194 * Multi-volume archives:                 Multi-Volume Archives.
5195                                                               (line   6)
5196 * Mutli-volume archives in PAX format, extracting using non-GNU tars: Split Recovery.
5197                                                               (line  17)
5198 * Mutli-volume archives, extracting using non-GNU tars: Split Recovery.
5199                                                               (line   6)
5200 * Naming an archive:                     file.                (line   8)
5201 * negative time stamps:                  Large or Negative Values.
5202                                                               (line   6)
5203 * next DAY:                              Day of week items.   (line  15)
5204 * next in date strings:                  General date syntax. (line  26)
5205 * noon in date strings:                  Time of day items.   (line  22)
5206 * now in date strings:                   Relative items in date strings.
5207                                                               (line  33)
5208 * ntape device:                          Many.                (line   6)
5209 * NUL terminated file names:             nul.                 (line   6)
5210 * Number of blocks per record:           Blocking Factor.     (line   6)
5211 * Number of bytes per record:            Blocking Factor.     (line   6)
5212 * numbered backup method:                backup.              (line  55)
5213 * numbers, written-out:                  General date syntax. (line  26)
5214 * Obtaining help:                        help.                (line  26)
5215 * Obtaining total status information:    verbose.             (line  46)
5216 * Old GNU archive format:                gnu.                 (line   6)
5217 * Old GNU sparse format:                 Old GNU Format.      (line   6)
5218 * Old style archives:                    old.                 (line   6)
5219 * Old style format:                      old.                 (line   6)
5220 * opt-doc-col:                           Configuring Help Summary.
5221                                                               (line 126)
5222 * option syntax, traditional:            Old Options.         (line  60)
5223 * Options when reading archives:         Reading.             (line   6)
5224 * Options, archive format specifying:    Format Variations.   (line   6)
5225 * Options, format specifying:            Format Variations.   (line   6)
5226 * ordinal numbers:                       General date syntax. (line  26)
5227 * Overwriting old files, prevention:     Dealing with Old Files.
5228                                                               (line  16)
5229 * pattern, genfile:                      Generate Mode.       (line  39)
5230 * PAX archive format:                    posix.               (line   6)
5231 * Permissions of extracted files:        Setting Access Permissions.
5232                                                               (line   6)
5233 * Pinard, F.:                            Authors of get_date. (line  14)
5234 * pm in date strings:                    Time of day items.   (line  22)
5235 * POSIX archive format:                  posix.               (line   6)
5236 * Progress information:                  verbose.             (line  83)
5237 * Protecting old files:                  Dealing with Old Files.
5238                                                               (line  26)
5239 * pure numbers in date strings:          Pure numbers in date strings.
5240                                                               (line   6)
5241 * RCS, excluding files:                  exclude.             (line  39)
5242 * Reading file names from a file:        files.               (line   6)
5243 * Reading incomplete records:            Reading.             (line   8)
5244 * Record Size:                           Blocking Factor.     (line   6)
5245 * Records, incomplete:                   Reading.             (line   8)
5246 * Recursion in directories, avoiding:    recurse.             (line   8)
5247 * relative items in date strings:        Relative items in date strings.
5248                                                               (line   6)
5249 * Remote devices:                        file.                (line  62)
5250 * remote tape drive:                     Remote Tape Server.  (line   6)
5251 * Removing files from an archive:        delete.              (line   8)
5252 * Replacing members with other members:  append.              (line  49)
5253 * reporting bugs:                        Reports.             (line   6)
5254 * RESTORE_BEGIN:                         User Hooks.          (line  39)
5255 * RESTORE_END:                           User Hooks.          (line  42)
5256 * Resurrecting files from an archive:    extract.             (line   8)
5257 * Retrieving files from an archive:      extract.             (line   8)
5258 * return status:                         Synopsis.            (line  67)
5259 * rmargin:                               Configuring Help Summary.
5260                                                               (line 158)
5261 * rmt:                                   Remote Tape Server.  (line   6)
5262 * RSH:                                   General-Purpose Variables.
5263                                                               (line  72)
5264 * RSH_COMMAND:                           General-Purpose Variables.
5265                                                               (line  77)
5266 * Running out of space:                  Scarce.              (line   8)
5267 * Salz, Rich:                            Authors of get_date. (line   6)
5268 * SCCS, excluding files:                 exclude.             (line  39)
5269 * short-opt-col:                         Configuring Help Summary.
5270                                                               (line  78)
5271 * simple backup method:                  backup.              (line  64)
5272 * SIMPLE_BACKUP_SUFFIX:                  backup.              (line  68)
5273 * sleep, checkpoint action:              checkpoints.         (line  90)
5274 * SLEEP_MESSAGE:                         General-Purpose Variables.
5275                                                               (line 111)
5276 * SLEEP_TIME:                            General-Purpose Variables.
5277                                                               (line  97)
5278 * Small memory:                          Scarce.              (line   8)
5279 * snapshot file, format 0:               Snapshot Files.      (line  23)
5280 * snapshot file, format 1:               Snapshot Files.      (line  47)
5281 * snapshot file, format 2:               Snapshot Files.      (line  69)
5282 * snapshot files, editing:               Fixing Snapshot Files.
5283                                                               (line   6)
5284 * snapshot files, fixing device numbers: Fixing Snapshot Files.
5285                                                               (line   6)
5286 * Sparse Files:                          sparse.              (line   6)
5287 * sparse files v.0.0, extracting with non-GNU tars: Sparse Recovery.
5288                                                               (line  92)
5289 * sparse files v.0.1, extracting with non-GNU tars: Sparse Recovery.
5290                                                               (line  92)
5291 * sparse files v.1.0, extracting with non-GNU tars: Sparse Recovery.
5292                                                               (line  17)
5293 * Sparse files, creating using genfile:  Generate Mode.       (line  55)
5294 * sparse files, extracting with non-GNU tars: Sparse Recovery.
5295                                                               (line   6)
5296 * sparse formats:                        Sparse Formats.      (line   6)
5297 * sparse formats, defined:               sparse.              (line  50)
5298 * sparse formats, Old GNU:               Old GNU Format.      (line   6)
5299 * sparse formats, v.0.0:                 PAX 0.               (line   6)
5300 * sparse formats, v.0.1:                 PAX 0.               (line  52)
5301 * sparse formats, v.1.0:                 PAX 1.               (line   6)
5302 * sparse versions:                       Sparse Formats.      (line   6)
5303 * Specifying archive members:            Selecting Archive Members.
5304                                                               (line   6)
5305 * Specifying files to act on:            Selecting Archive Members.
5306                                                               (line   6)
5307 * Standard input and output:             file.                (line  41)
5308 * Standard output, writing extracted files to: Writing to Standard Output.
5309                                                               (line   6)
5310 * Storing archives in compressed format: gzip.                (line   6)
5311 * SVN, excluding files:                  exclude.             (line  39)
5312 * Symbolic link as file name:            dereference.         (line   6)
5313 * TAPE:                                  file tutorial.       (line  14)
5314 * tape blocking:                         Blocking Factor.     (line 194)
5315 * tape marks:                            Many.                (line  44)
5316 * tape positioning:                      Many.                (line  26)
5317 * TAPE_FILE:                             General-Purpose Variables.
5318                                                               (line  19)
5319 * Tapes, using --delete and:             delete.              (line  19)
5320 * TAR:                                   General-Purpose Variables.
5321                                                               (line 115)
5322 * tar:                                   What tar Does.       (line   6)
5323 * tar archive:                           Definitions.         (line   6)
5324 * Tar archive formats:                   Formats.             (line   6)
5325 * tar entry:                             Naming tar Archives. (line  11)
5326 * tar file:                              Naming tar Archives. (line  11)
5327 * tar to a remote device:                file.                (line  62)
5328 * tar to standard input and output:      file.                (line  41)
5329 * tar-snapshot-edit:                     Fixing Snapshot Files.
5330                                                               (line  15)
5331 * TAR_ARCHIVE, checkpoint script environment: checkpoints.    (line 108)
5332 * TAR_ARCHIVE, info script environment variable: Multi-Volume Archives.
5333                                                               (line 100)
5334 * TAR_ATIME, to-command environment:     Writing to an External Program.
5335                                                               (line  49)
5336 * TAR_BLOCKING_FACTOR, checkpoint script environment: checkpoints.
5337                                                               (line 111)
5338 * TAR_BLOCKING_FACTOR, info script environment variable: Multi-Volume Archives.
5339                                                               (line 103)
5340 * TAR_CHECKPOINT, checkpoint script environment: checkpoints. (line 114)
5341 * TAR_CTIME, to-command environment:     Writing to an External Program.
5342                                                               (line  58)
5343 * TAR_FD, info script environment variable: Multi-Volume Archives.
5344                                                               (line 117)
5345 * TAR_FILENAME, to-command environment:  Writing to an External Program.
5346                                                               (line  37)
5347 * TAR_FILETYPE, to-command environment:  Writing to an External Program.
5348                                                               (line  22)
5349 * TAR_FORMAT, checkpoint script environment: checkpoints.     (line 121)
5350 * TAR_FORMAT, info script environment variable: Multi-Volume Archives.
5351                                                               (line 113)
5352 * TAR_GID, to-command environment:       Writing to an External Program.
5353                                                               (line  67)
5354 * TAR_GNAME, to-command environment:     Writing to an External Program.
5355                                                               (line  46)
5356 * TAR_MODE, to-command environment:      Writing to an External Program.
5357                                                               (line  34)
5358 * TAR_MTIME, to-command environment:     Writing to an External Program.
5359                                                               (line  55)
5360 * TAR_OPTIONS, environment variable:     using tar options.   (line  30)
5361 * TAR_REALNAME, to-command environment:  Writing to an External Program.
5362                                                               (line  40)
5363 * TAR_SIZE, to-command environment:      Writing to an External Program.
5364                                                               (line  61)
5365 * TAR_SUBCOMMAND, checkpoint script environment: checkpoints. (line 117)
5366 * TAR_SUBCOMMAND, info script environment variable: Multi-Volume Archives.
5367                                                               (line 109)
5368 * TAR_UID, to-command environment:       Writing to an External Program.
5369                                                               (line  64)
5370 * TAR_UNAME, to-command environment:     Writing to an External Program.
5371                                                               (line  43)
5372 * TAR_VERSION, checkpoint script environment: checkpoints.    (line 105)
5373 * TAR_VERSION, info script environment variable: Multi-Volume Archives.
5374                                                               (line  97)
5375 * TAR_VOLUME, info script environment variable: Multi-Volume Archives.
5376                                                               (line 106)
5377 * tarcat:                                Tarcat.              (line   6)
5378 * this in date strings:                  Relative items in date strings.
5379                                                               (line  33)
5380 * time of day item:                      Time of day items.   (line   6)
5381 * time zone correction:                  Time of day items.   (line  30)
5382 * time zone item <1>:                    Time zone items.     (line   6)
5383 * time zone item:                        General date syntax. (line  44)
5384 * today in date strings:                 Relative items in date strings.
5385                                                               (line  33)
5386 * tomorrow in date strings:              Relative items in date strings.
5387                                                               (line  29)
5388 * ttyout, checkpoint action:             checkpoints.         (line  70)
5389 * TZ:                                    Specifying time zone rules.
5390                                                               (line   6)
5391 * Ultrix 3.1 and write failure:          Remote Tape Server.  (line  40)
5392 * unpacking:                             Definitions.         (line  22)
5393 * Updating an archive:                   update.              (line   8)
5394 * usage-indent:                          Configuring Help Summary.
5395                                                               (line 154)
5396 * Using encrypted archives:              gzip.                (line 163)
5397 * ustar archive format:                  ustar.               (line   6)
5398 * uuencode:                              Applications.        (line   8)
5399 * v7 archive format:                     old.                 (line   6)
5400 * VCS, excluding files:                  exclude.             (line  39)
5401 * Verbose operation:                     verbose.             (line  18)
5402 * Verifying a write operation:           verify.              (line   6)
5403 * Verifying the currency of an archive:  compare.             (line   6)
5404 * version control system, excluding files: exclude.           (line  39)
5405 * Version of the tar program:            help.                (line   6)
5406 * version-control Emacs variable:        backup.              (line  49)
5407 * VERSION_CONTROL:                       backup.              (line  41)
5408 * volno file:                            Multi-Volume Archives.
5409                                                               (line  71)
5410 * VOLNO_FILE:                            General-Purpose Variables.
5411                                                               (line  82)
5412 * Volume label, listing:                 label.               (line  29)
5413 * Volume number file:                    Multi-Volume Archives.
5414                                                               (line  71)
5415 * week in date strings:                  Relative items in date strings.
5416                                                               (line  15)
5417 * Where is the archive?:                 file.                (line   8)
5418 * Working directory, specifying:         directory.           (line   6)
5419 * Writing extracted files to standard output: Writing to Standard Output.
5420                                                               (line   6)
5421 * Writing new archives:                  file.                (line  36)
5422 * XLIST:                                 General-Purpose Variables.
5423                                                               (line  87)
5424 * xsparse:                               Sparse Recovery.     (line  13)
5425 * year in date strings:                  Relative items in date strings.
5426                                                               (line  15)
5427 * yesterday in date strings:             Relative items in date strings.
5428                                                               (line  29)
5429
5430