GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / share / info / tar.info-2
blob3c726720da652a9b1129b23a6cdd0d9fa71a91f3
1 This is tar.info, produced by makeinfo version 4.13 from tar.texi.
3 This manual is for GNU `tar' (version 1.26, 12 March 2011), which
4 creates and extracts files from archives.
6    Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003,
7 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
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.3 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".
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."
21 INFO-DIR-SECTION Archiving
22 START-INFO-DIR-ENTRY
23 * Tar: (tar).                   Making tape (or disk) archives.
24 END-INFO-DIR-ENTRY
26 INFO-DIR-SECTION Individual utilities
27 START-INFO-DIR-ENTRY
28 * tar: (tar)tar invocation.                     Invoking GNU `tar'.
29 END-INFO-DIR-ENTRY
31 \x1f
32 File: tar.info,  Node: Formats,  Next: Media,  Prev: Date input formats,  Up: Top
34 8 Controlling the Archive Format
35 ********************************
37 Due to historical reasons, there are several formats of tar archives.
38 All of them are based on the same principles, but have some subtle
39 differences that often make them incompatible with each other.
41    GNU tar is able to create and handle archives in a variety of
42 formats.  The most frequently used formats are (in alphabetical order):
44 gnu
45      Format used by GNU `tar' versions up to 1.13.25.  This format
46      derived from an early POSIX standard, adding some improvements
47      such as sparse file handling and incremental archives.
48      Unfortunately these features were implemented in a way
49      incompatible with other archive formats.
51      Archives in `gnu' format are able to hold file names of unlimited
52      length.
54 oldgnu
55      Format used by GNU `tar' of versions prior to 1.12.
58      Archive format, compatible with the V7 implementation of tar.  This
59      format imposes a number of limitations.  The most important of them
60      are:
62        1. The maximum length of a file name is limited to 99 characters.
64        2. The maximum length of a symbolic link is limited to 99
65           characters.
67        3. It is impossible to store special files (block and character
68           devices, fifos etc.)
70        4. Maximum value of user or group ID is limited to 2097151
71           (7777777 octal)
73        5. V7 archives do not contain symbolic ownership information
74           (user and group name of the file owner).
76      This format has traditionally been used by Automake when producing
77      Makefiles.  This practice will change in the future, in the
78      meantime, however this means that projects containing file names
79      more than 99 characters long will not be able to use GNU `tar'
80      1.26 and Automake prior to 1.9.
82 ustar
83      Archive format defined by POSIX.1-1988 specification.  It stores
84      symbolic ownership information.  It is also able to store special
85      files.  However, it imposes several restrictions as well:
87        1. The maximum length of a file name is limited to 256
88           characters, provided that the file name can be split at a
89           directory separator in two parts, first of them being at most
90           155 bytes long.  So, in most cases the maximum file name
91           length will be shorter than 256 characters.
93        2. The maximum length of a symbolic link name is limited to 100
94           characters.
96        3. Maximum size of a file the archive is able to accommodate is
97           8GB
99        4. Maximum value of UID/GID is 2097151.
101        5. Maximum number of bits in device major and minor numbers is
102           21.
104 star
105      Format used by Jo"rg Schilling `star' implementation.  GNU `tar'
106      is able to read `star' archives but currently does not produce
107      them.
109 posix
110      Archive format defined by POSIX.1-2001 specification.  This is the
111      most flexible and feature-rich format.  It does not impose any
112      restrictions on file sizes or file name lengths.  This format is
113      quite recent, so not all tar implementations are able to handle it
114      properly.  However, this format is designed in such a way that any
115      tar implementation able to read `ustar' archives will be able to
116      read most `posix' archives as well, with the only exception that
117      any additional information (such as long file names etc.) will in
118      such case be extracted as plain text files along with the files it
119      refers to.
121      This archive format will be the default format for future versions
122      of GNU `tar'.
125    The following table summarizes the limitations of each of these
126 formats:
128 Format  UID            File Size      File Name      Devn
129 -------------------------------------------------------------------- 
130 gnu     1.8e19         Unlimited      Unlimited      63
131 oldgnu  1.8e19         Unlimited      Unlimited      63
132 v7      2097151        8GB            99             n/a
133 ustar   2097151        8GB            256            21
134 posix   Unlimited      Unlimited      Unlimited      Unlimited
136    The default format for GNU `tar' is defined at compilation time.
137 You may check it by running `tar --help', and examining the last lines
138 of its output.  Usually, GNU `tar' is configured to create archives in
139 `gnu' format, however, future version will switch to `posix'.
141 * Menu:
143 * Compression::                 Using Less Space through Compression
144 * Attributes::                  Handling File Attributes
145 * Portability::                 Making `tar' Archives More Portable
146 * cpio::                        Comparison of `tar' and `cpio'
148 \x1f
149 File: tar.info,  Node: Compression,  Next: Attributes,  Up: Formats
151 8.1 Using Less Space through Compression
152 ========================================
154 * Menu:
156 * gzip::                        Creating and Reading Compressed Archives
157 * sparse::                      Archiving Sparse Files
159 \x1f
160 File: tar.info,  Node: gzip,  Next: sparse,  Up: Compression
162 8.1.1 Creating and Reading Compressed Archives
163 ----------------------------------------------
165 GNU `tar' is able to create and read compressed archives.  It supports
166 a wide variety of compression programs, namely: `gzip', `bzip2',
167 `lzip', `lzma', `lzop', `xz' and traditional `compress'. The latter is
168 supported mostly for backward compatibility, and we recommend against
169 using it, because it is by far less effective than the other
170 compression programs(1).
172    Creating a compressed archive is simple: you just specify a
173 "compression option" along with the usual archive creation commands.
174 The compression option is `-z' (`--gzip') to create a `gzip' compressed
175 archive, `-j' (`--bzip2') to create a `bzip2' compressed archive,
176 `--lzip' to create an lzip compressed archive, `-J' (`--xz') to create
177 an XZ archive, `--lzma' to create an LZMA compressed archive, `--lzop'
178 to create an LSOP archive, and `-Z' (`--compress') to use `compress'
179 program.  For example:
181      $ tar cfz archive.tar.gz .
183    You can also let GNU `tar' select the compression program based on
184 the suffix of the archive file name. This is done using
185 `--auto-compress' (`-a') command line option. For example, the
186 following invocation will use `bzip2' for compression:
188      $ tar cfa archive.tar.bz2 .
190 whereas the following one will use `lzma':
192      $ tar cfa archive.tar.lzma .
194    For a complete list of file name suffixes recognized by GNU `tar',
195 see *note auto-compress::.
197    Reading compressed archive is even simpler: you don't need to specify
198 any additional options as GNU `tar' recognizes its format
199 automatically.  Thus, the following commands will list and extract the
200 archive created in previous example:
202      # List the compressed archive
203      $ tar tf archive.tar.gz
204      # Extract the compressed archive
205      $ tar xf archive.tar.gz
207    The format recognition algorithm is based on "signatures", a special
208 byte sequences in the beginning of file, that are specific for certain
209 compression formats.  If this approach fails, `tar' falls back to using
210 archive name suffix to determine its format (*note auto-compress::, for
211 a list of recognized suffixes).
213    Some compression programs are able to handle different compression
214 formats.  GNU `tar' uses this, if the principal decompressor for the
215 given format is not available.  For example, if `compress' is not
216 installed, `tar' will try to use `gzip'.  As of version 1.26 the
217 following alternatives are tried(2):
219 Format                 Main decompressor      Alternatives
220 --------------------------------------------------------------------- 
221 compress               compress               gzip
222 lzma                   lzma                   xz
223 bzip2                  bzip2                  lbzip2
225    The only case when you have to specify a decompression option while
226 reading the archive is when reading from a pipe or from a tape drive
227 that does not support random access.  However, in this case GNU `tar'
228 will indicate which option you should use.  For example:
230      $ cat archive.tar.gz | tar tf -
231      tar: Archive is compressed.  Use -z option
232      tar: Error is not recoverable: exiting now
234    If you see such diagnostics, just add the suggested option to the
235 invocation of GNU `tar':
237      $ cat archive.tar.gz | tar tfz -
239    Notice also, that there are several restrictions on operations on
240 compressed archives.  First of all, compressed archives cannot be
241 modified, i.e., you cannot update (`--update', alias `-u') them or
242 delete (`--delete') members from them or add (`--append', alias `-r')
243 members to them.  Likewise, you cannot append another `tar' archive to
244 a compressed archive using `--concatenate' (`-A').  Secondly,
245 multi-volume archives cannot be compressed.
247    The following options allow to select a particular compressor
248 program:
250 `-z'
251 `--gzip'
252 `--ungzip'
253      Filter the archive through `gzip'.
255 `-J'
256 `--xz'
257      Filter the archive through `xz'.
259 `-j'
260 `--bzip2'
261      Filter the archive through `bzip2'.
263 `--lzip'
264      Filter the archive through `lzip'.
266 `--lzma'
267      Filter the archive through `lzma'.
269 `--lzop'
270      Filter the archive through `lzop'.
272 `-Z'
273 `--compress'
274 `--uncompress'
275      Filter the archive through `compress'.
277    When any of these options is given, GNU `tar' searches the compressor
278 binary in the current path and invokes it.  The name of the compressor
279 program is specified at compilation time using a corresponding
280 `--with-COMPNAME' option to `configure', e.g.  `--with-bzip2' to select
281 a specific `bzip2' binary.  *Note lbzip2::, for a detailed discussion.
283    The output produced by `tar --help' shows the actual compressor
284 names along with each of these options.
286    You can use any of these options on physical devices (tape drives,
287 etc.) and remote files as well as on normal files; data to or from such
288 devices or remote files is reblocked by another copy of the `tar'
289 program to enforce the specified (or default) record size.  The default
290 compression parameters are used.  Most compression programs allow to
291 override these by setting a program-specific environment variable.  For
292 example, when using `gzip' you can use `GZIP' as in the example below:
294      $ GZIP=--best tar cfz archive.tar.gz subdir
296 Another way would be to use the `-I' option instead (see below), e.g.:
298      $ tar -cf archive.tar.gz -I 'gzip --best' subdir
300 Finally, the third, traditional, way to achieve the same result is to
301 use pipe:
303      $ tar cf - subdir | gzip --best -c - > archive.tar.gz
305    About corrupted compressed archives: compressed files have no
306 redundancy, for maximum compression.  The adaptive nature of the
307 compression scheme means that the compression tables are implicitly
308 spread all over the archive.  If you lose a few blocks, the dynamic
309 construction of the compression tables becomes unsynchronized, and there
310 is little chance that you could recover later in the archive.
312    Another compression options provide a better control over creating
313 compressed archives.  These are:
315 `--auto-compress'
316 `-a'
317      Select a compression program to use by the archive file name
318      suffix.  The following suffixes are recognized:
320      Suffix               Compression program
321      -------------------------------------------------------------- 
322      `.gz'                `gzip'
323      `.tgz'               `gzip'
324      `.taz'               `gzip'
325      `.Z'                 `compress'
326      `.taZ'               `compress'
327      `.bz2'               `bzip2'
328      `.tz2'               `bzip2'
329      `.tbz2'              `bzip2'
330      `.tbz'               `bzip2'
331      `.lz'                `lzip'
332      `.lzma'              `lzma'
333      `.tlz'               `lzma'
334      `.lzo'               `lzop'
335      `.xz'                `xz'
337 `--use-compress-program=PROG'
338 `-I=PROG'
339      Use external compression program PROG.  Use this option if you are
340      not happy with the compression program associated with the suffix
341      at compile time or if you have a compression program that GNU `tar'
342      does not support.  There are two requirements to which PROG should
343      comply:
345      First, when called without options, it should read data from
346      standard input, compress it and output it on standard output.
348      Secondly, if called with `-d' argument, it should do exactly the
349      opposite, i.e., read the compressed data from the standard input
350      and produce uncompressed data on the standard output.
352    The `--use-compress-program' option, in particular, lets you
353 implement your own filters, not necessarily dealing with
354 compression/decompression.  For example, suppose you wish to implement
355 PGP encryption on top of compression, using `gpg' (*note gpg:
356 (gpg)Top.).  The following script does that:
358      #! /bin/sh
359      case $1 in
360      -d) gpg --decrypt - | gzip -d -c;;
361      '') gzip -c | gpg -s;;
362      *)  echo "Unknown option $1">&2; exit 1;;
363      esac
365    Suppose you name it `gpgz' and save it somewhere in your `PATH'.
366 Then the following command will create a compressed archive signed with
367 your private key:
369      $ tar -cf foo.tar.gpgz -Igpgz .
371 Likewise, the command below will list its contents:
373      $ tar -tf foo.tar.gpgz -Igpgz .
375 * Menu:
377 * lbzip2::  Using lbzip2 with GNU `tar'.
379    ---------- Footnotes ----------
381    (1) It also had patent problems in the past.
383    (2) To verbosely trace the decompressor selection, use the
384 `--warning=decompress-program' option (*note decompress-program:
385 warnings.).
387 \x1f
388 File: tar.info,  Node: lbzip2,  Up: gzip
390 8.1.1.1 Using lbzip2 with GNU `tar'.
391 ....................................
393 `Lbzip2' is a multithreaded utility for handling `bzip2' compression,
394 written by Laszlo Ersek.  It makes use of multiple processors to speed
395 up its operation and in general works considerably faster than `bzip2'.
396 For a detailed description of `lbzip2' see
397 `http://freshmeat.net/projects/lbzip2' and lbzip2: parallel bzip2
398 utility
399 (http://www.linuxinsight.com/lbzip2-parallel-bzip2-utility.html).
401    Recent versions of `lbzip2' are mostly command line compatible with
402 `bzip2', which makes it possible to automatically invoke it via the
403 `--bzip2' GNU `tar' command line option.  To do so, GNU `tar' must be
404 configured with the `--with-bzip2' command line option, like this:
406      $ ./configure --with-bzip2=lbzip2 [OTHER-OPTIONS]
408    Once configured and compiled this way, `tar --help' will show the
409 following:
411      $ tar --help | grep -- --bzip2
412        -j, --bzip2                filter the archive through lbzip2
414 which means that running `tar --bzip2' will invoke `lbzip2'.
416 \x1f
417 File: tar.info,  Node: sparse,  Prev: gzip,  Up: Compression
419 8.1.2 Archiving Sparse Files
420 ----------------------------
422 Files in the file system occasionally have "holes".  A "hole" in a file
423 is a section of the file's contents which was never written.  The
424 contents of a hole reads as all zeros.  On many operating systems,
425 actual disk storage is not allocated for holes, but they are counted in
426 the length of the file.  If you archive such a file, `tar' could create
427 an archive longer than the original.  To have `tar' attempt to
428 recognize the holes in a file, use `--sparse' (`-S').  When you use
429 this option, then, for any file using less disk space than would be
430 expected from its length, `tar' searches the file for consecutive
431 stretches of zeros.  It then records in the archive for the file where
432 the consecutive stretches of zeros are, and only archives the "real
433 contents" of the file.  On extraction (using `--sparse' is not needed
434 on extraction) any such files have holes created wherever the
435 continuous stretches of zeros were found.  Thus, if you use `--sparse',
436 `tar' archives won't take more space than the original.
438 `-S'
439 `--sparse'
440      This option instructs `tar' to test each file for sparseness
441      before attempting to archive it.  If the file is found to be
442      sparse it is treated specially, thus allowing to decrease the
443      amount of space used by its image in the archive.
445      This option is meaningful only when creating or updating archives.
446      It has no effect on extraction.
448    Consider using `--sparse' when performing file system backups, to
449 avoid archiving the expanded forms of files stored sparsely in the
450 system.
452    Even if your system has no sparse files currently, some may be
453 created in the future.  If you use `--sparse' while making file system
454 backups as a matter of course, you can be assured the archive will
455 never take more space on the media than the files take on disk
456 (otherwise, archiving a disk filled with sparse files might take
457 hundreds of tapes).  *Note Incremental Dumps::.
459    However, be aware that `--sparse' option presents a serious
460 drawback.  Namely, in order to determine if the file is sparse `tar'
461 has to read it before trying to archive it, so in total the file is
462 read *twice*.  So, always bear in mind that the time needed to process
463 all files with this option is roughly twice the time needed to archive
464 them without it.
466    When using `POSIX' archive format, GNU `tar' is able to store sparse
467 files using in three distinct ways, called "sparse formats".  A sparse
468 format is identified by its "number", consisting, as usual of two
469 decimal numbers, delimited by a dot.  By default, format `1.0' is used.
470 If, for some reason, you wish to use an earlier format, you can select
471 it using `--sparse-version' option.
473 `--sparse-version=VERSION'
474      Select the format to store sparse files in.  Valid VERSION values
475      are: `0.0', `0.1' and `1.0'.  *Note Sparse Formats::, for a
476      detailed description of each format.
478    Using `--sparse-format' option implies `--sparse'.
480 \x1f
481 File: tar.info,  Node: Attributes,  Next: Portability,  Prev: Compression,  Up: Formats
483 8.2 Handling File Attributes
484 ============================
486 When `tar' reads files, it updates their access times.  To avoid this,
487 use the `--atime-preserve[=METHOD]' option, which can either reset the
488 access time retroactively or avoid changing it in the first place.
490 `--atime-preserve'
491 `--atime-preserve=replace'
492 `--atime-preserve=system'
493      Preserve the access times of files that are read.  This works only
494      for files that you own, unless you have superuser privileges.
496      `--atime-preserve=replace' works on most systems, but it also
497      restores the data modification time and updates the status change
498      time.  Hence it doesn't interact with incremental dumps nicely
499      (*note Incremental Dumps::), and it can set access or data
500      modification times incorrectly if other programs access the file
501      while `tar' is running.
503      `--atime-preserve=system' avoids changing the access time in the
504      first place, if the operating system supports this.
505      Unfortunately, this may or may not work on any given operating
506      system or file system.  If `tar' knows for sure it won't work, it
507      complains right away.
509      Currently `--atime-preserve' with no operand defaults to
510      `--atime-preserve=replace', but this is intended to change to
511      `--atime-preserve=system' when the latter is better-supported.
513 `-m'
514 `--touch'
515      Do not extract data modification time.
517      When this option is used, `tar' leaves the data modification times
518      of the files it extracts as the times when the files were
519      extracted, instead of setting it to the times recorded in the
520      archive.
522      This option is meaningless with `--list' (`-t').
524 `--same-owner'
525      Create extracted files with the same ownership they have in the
526      archive.
528      This is the default behavior for the superuser, so this option is
529      meaningful only for non-root users, when `tar' is executed on
530      those systems able to give files away.  This is considered as a
531      security flaw by many people, at least because it makes quite
532      difficult to correctly account users for the disk space they
533      occupy.  Also, the `suid' or `sgid' attributes of files are easily
534      and silently lost when files are given away.
536      When writing an archive, `tar' writes the user ID and user name
537      separately.  If it can't find a user name (because the user ID is
538      not in `/etc/passwd'), then it does not write one.  When restoring,
539      it tries to look the name (if one was written) up in
540      `/etc/passwd'.  If it fails, then it uses the user ID stored in
541      the archive instead.
543 `--no-same-owner'
544 `-o'
545      Do not attempt to restore ownership when extracting.  This is the
546      default behavior for ordinary users, so this option has an effect
547      only for the superuser.
549 `--numeric-owner'
550      The `--numeric-owner' option allows (ANSI) archives to be written
551      without user/group name information or such information to be
552      ignored when extracting.  It effectively disables the generation
553      and/or use of user/group name information.  This option forces
554      extraction using the numeric ids from the archive, ignoring the
555      names.
557      This is useful in certain circumstances, when restoring a backup
558      from an emergency floppy with different passwd/group files for
559      example.  It is otherwise impossible to extract files with the
560      right ownerships if the password file in use during the extraction
561      does not match the one belonging to the file system(s) being
562      extracted.  This occurs, for example, if you are restoring your
563      files after a major crash and had booted from an emergency floppy
564      with no password file or put your disk into another machine to do
565      the restore.
567      The numeric ids are _always_ saved into `tar' archives.  The
568      identifying names are added at create time when provided by the
569      system, unless `--format=oldgnu' is used.  Numeric ids could be
570      used when moving archives between a collection of machines using a
571      centralized management for attribution of numeric ids to users and
572      groups.  This is often made through using the NIS capabilities.
574      When making a `tar' file for distribution to other sites, it is
575      sometimes cleaner to use a single owner for all files in the
576      distribution, and nicer to specify the write permission bits of the
577      files as stored in the archive independently of their actual value
578      on the file system.  The way to prepare a clean distribution is
579      usually to have some Makefile rule creating a directory, copying
580      all needed files in that directory, then setting ownership and
581      permissions as wanted (there are a lot of possible schemes), and
582      only then making a `tar' archive out of this directory, before
583      cleaning everything out.  Of course, we could add a lot of options
584      to GNU `tar' for fine tuning permissions and ownership.  This is
585      not the good way, I think.  GNU `tar' is already crowded with
586      options and moreover, the approach just explained gives you a
587      great deal of control already.
589 `-p'
590 `--same-permissions'
591 `--preserve-permissions'
592      Extract all protection information.
594      This option causes `tar' to set the modes (access permissions) of
595      extracted files exactly as recorded in the archive.  If this option
596      is not used, the current `umask' setting limits the permissions on
597      extracted files.  This option is by default enabled when `tar' is
598      executed by a superuser.
600      This option is meaningless with `--list' (`-t').
602 `--preserve'
603      Same as both `--same-permissions' and `--same-order'.
605      This option is deprecated, and will be removed in GNU `tar'
606      version 1.23.
609 \x1f
610 File: tar.info,  Node: Portability,  Next: cpio,  Prev: Attributes,  Up: Formats
612 8.3 Making `tar' Archives More Portable
613 =======================================
615 Creating a `tar' archive on a particular system that is meant to be
616 useful later on many other machines and with other versions of `tar' is
617 more challenging than you might think.  `tar' archive formats have been
618 evolving since the first versions of Unix.  Many such formats are
619 around, and are not always compatible with each other.  This section
620 discusses a few problems, and gives some advice about making `tar'
621 archives more portable.
623    One golden rule is simplicity.  For example, limit your `tar'
624 archives to contain only regular files and directories, avoiding other
625 kind of special files.  Do not attempt to save sparse files or
626 contiguous files as such.  Let's discuss a few more problems, in turn.
628 * Menu:
630 * Portable Names::              Portable Names
631 * dereference::                 Symbolic Links
632 * hard links::                  Hard Links
633 * old::                         Old V7 Archives
634 * ustar::                       Ustar Archives
635 * gnu::                         GNU and old GNU format archives.
636 * posix::                       POSIX archives
637 * Checksumming::                Checksumming Problems
638 * Large or Negative Values::    Large files, negative time stamps, etc.
639 * Other Tars::                  How to Extract GNU-Specific Data Using
640                                 Other `tar' Implementations
642 \x1f
643 File: tar.info,  Node: Portable Names,  Next: dereference,  Up: Portability
645 8.3.1 Portable Names
646 --------------------
648 Use portable file and member names.  A name is portable if it contains
649 only ASCII letters and digits, `/', `.', `_', and `-'; it cannot be
650 empty, start with `-' or `//', or contain `/-'.  Avoid deep directory
651 nesting.  For portability to old Unix hosts, limit your file name
652 components to 14 characters or less.
654    If you intend to have your `tar' archives to be read under MSDOS,
655 you should not rely on case distinction for file names, and you might
656 use the GNU `doschk' program for helping you further diagnosing illegal
657 MSDOS names, which are even more limited than System V's.
659 \x1f
660 File: tar.info,  Node: dereference,  Next: hard links,  Prev: Portable Names,  Up: Portability
662 8.3.2 Symbolic Links
663 --------------------
665 Normally, when `tar' archives a symbolic link, it writes a block to the
666 archive naming the target of the link.  In that way, the `tar' archive
667 is a faithful record of the file system contents.  When `--dereference'
668 (`-h') is used with `--create' (`-c'), `tar' archives the files
669 symbolic links point to, instead of the links themselves.
671    When creating portable archives, use `--dereference' (`-h'): some
672 systems do not support symbolic links, and moreover, your distribution
673 might be unusable if it contains unresolved symbolic links.
675    When reading from an archive, the `--dereference' (`-h') option
676 causes `tar' to follow an already-existing symbolic link when `tar'
677 writes or reads a file named in the archive.  Ordinarily, `tar' does
678 not follow such a link, though it may remove the link before writing a
679 new file.  *Note Dealing with Old Files::.
681    The `--dereference' option is unsafe if an untrusted user can modify
682 directories while `tar' is running.  *Note Security::.
684 \x1f
685 File: tar.info,  Node: hard links,  Next: old,  Prev: dereference,  Up: Portability
687 8.3.3 Hard Links
688 ----------------
690 Normally, when `tar' archives a hard link, it writes a block to the
691 archive naming the target of the link (a `1' type block).  In that way,
692 the actual file contents is stored in file only once.  For example,
693 consider the following two files:
695      $ ls -l
696      -rw-r--r-- 2 gray staff 4 2007-10-30 15:11 one
697      -rw-r--r-- 2 gray staff 4 2007-10-30 15:11 jeden
699    Here, `jeden' is a link to `one'.  When archiving this directory
700 with a verbose level 2, you will get an output similar to the following:
702      $ tar cfvv ../archive.tar .
703      drwxr-xr-x gray/staff        0 2007-10-30 15:13 ./
704      -rw-r--r-- gray/staff        4 2007-10-30 15:11 ./jeden
705      hrw-r--r-- gray/staff        0 2007-10-30 15:11 ./one link to ./jeden
707    The last line shows that, instead of storing two copies of the file,
708 `tar' stored it only once, under the name `jeden', and stored file
709 `one' as a hard link to this file.
711    It may be important to know that all hard links to the given file are
712 stored in the archive.  For example, this may be necessary for exact
713 reproduction of the file system.  The following option does that:
715 `--check-links'
716 `-l'
717      Check the number of links dumped for each processed file.  If this
718      number does not match the total number of hard links for the file,
719      print a warning message.
721    For example, trying to archive only file `jeden' with this option
722 produces the following diagnostics:
724      $ tar -c -f ../archive.tar -l jeden
725      tar: Missing links to `jeden'.
727    Although creating special records for hard links helps keep a
728 faithful record of the file system contents and makes archives more
729 compact, it may present some difficulties when extracting individual
730 members from the archive.  For example, trying to extract file `one'
731 from the archive created in previous examples produces, in the absense
732 of file `jeden':
734      $ tar xf archive.tar ./one
735      tar: ./one: Cannot hard link to `./jeden': No such file or directory
736      tar: Error exit delayed from previous errors
738    The reason for this behavior is that `tar' cannot seek back in the
739 archive to the previous member (in this case, `one'), to extract it(1).
740 If you wish to avoid such problems at the cost of a bigger archive, use
741 the following option:
743 `--hard-dereference'
744      Dereference hard links and store the files they refer to.
746    For example, trying this option on our two sample files, we get two
747 copies in the archive, each of which can then be extracted
748 independently of the other:
750      $ tar -c -vv -f ../archive.tar --hard-dereference .
751      drwxr-xr-x gray/staff        0 2007-10-30 15:13 ./
752      -rw-r--r-- gray/staff        4 2007-10-30 15:11 ./jeden
753      -rw-r--r-- gray/staff        4 2007-10-30 15:11 ./one
755    ---------- Footnotes ----------
757    (1) There are plans to fix this in future releases.
759 \x1f
760 File: tar.info,  Node: old,  Next: ustar,  Prev: hard links,  Up: Portability
762 8.3.4 Old V7 Archives
763 ---------------------
765 Certain old versions of `tar' cannot handle additional information
766 recorded by newer `tar' programs.  To create an archive in V7 format
767 (not ANSI), which can be read by these old versions, specify the
768 `--format=v7' option in conjunction with the `--create' (`-c') (`tar'
769 also accepts `--portability' or `--old-archive' for this option).  When
770 you specify it, `tar' leaves out information about directories, pipes,
771 fifos, contiguous files, and device files, and specifies file ownership
772 by group and user IDs instead of group and user names.
774    When updating an archive, do not use `--format=v7' unless the
775 archive was created using this option.
777    In most cases, a _new_ format archive can be read by an _old_ `tar'
778 program without serious trouble, so this option should seldom be
779 needed.  On the other hand, most modern `tar's are able to read old
780 format archives, so it might be safer for you to always use
781 `--format=v7' for your distributions.  Notice, however, that `ustar'
782 format is a better alternative, as it is free from many of `v7''s
783 drawbacks.
785 \x1f
786 File: tar.info,  Node: ustar,  Next: gnu,  Prev: old,  Up: Portability
788 8.3.5 Ustar Archive Format
789 --------------------------
791 Archive format defined by POSIX.1-1988 specification is called `ustar'.
792 Although it is more flexible than the V7 format, it still has many
793 restrictions (*note ustar: Formats, for the detailed description of
794 `ustar' format).  Along with V7 format, `ustar' format is a good choice
795 for archives intended to be read with other implementations of `tar'.
797    To create archive in `ustar' format, use `--format=ustar' option in
798 conjunction with the `--create' (`-c').
800 \x1f
801 File: tar.info,  Node: gnu,  Next: posix,  Prev: ustar,  Up: Portability
803 8.3.6 GNU and old GNU `tar' format
804 ----------------------------------
806 GNU `tar' was based on an early draft of the POSIX 1003.1 `ustar'
807 standard.  GNU extensions to `tar', such as the support for file names
808 longer than 100 characters, use portions of the `tar' header record
809 which were specified in that POSIX draft as unused.  Subsequent changes
810 in POSIX have allocated the same parts of the header record for other
811 purposes.  As a result, GNU `tar' format is incompatible with the
812 current POSIX specification, and with `tar' programs that follow it.
814    In the majority of cases, `tar' will be configured to create this
815 format by default.  This will change in future releases, since we plan
816 to make `POSIX' format the default.
818    To force creation a GNU `tar' archive, use option `--format=gnu'.
820 \x1f
821 File: tar.info,  Node: posix,  Next: Checksumming,  Prev: gnu,  Up: Portability
823 8.3.7 GNU `tar' and POSIX `tar'
824 -------------------------------
826 Starting from version 1.14 GNU `tar' features full support for
827 POSIX.1-2001 archives.
829    A POSIX conformant archive will be created if `tar' was given
830 `--format=posix' (`--format=pax') option.  No special option is
831 required to read and extract from a POSIX archive.
833 * Menu:
835 * PAX keywords:: Controlling Extended Header Keywords.
837 \x1f
838 File: tar.info,  Node: PAX keywords,  Up: posix
840 8.3.7.1 Controlling Extended Header Keywords
841 ............................................
843 `--pax-option=KEYWORD-LIST'
844      Handle keywords in PAX extended headers.  This option is
845      equivalent to `-o' option of the `pax' utility.
847    KEYWORD-LIST is a comma-separated list of keyword options, each
848 keyword option taking one of the following forms:
850 `delete=PATTERN'
851      When used with one of archive-creation commands, this option
852      instructs `tar' to omit from extended header records that it
853      produces any keywords matching the string PATTERN.
855      When used in extract or list mode, this option instructs tar to
856      ignore any keywords matching the given PATTERN in the extended
857      header records.  In both cases, matching is performed using the
858      pattern matching notation described in POSIX 1003.2, 3.13 (*note
859      wildcards::).  For example:
861           --pax-option delete=security.*
863      would suppress security-related information.
865 `exthdr.name=STRING'
866      This keyword allows user control over the name that is written
867      into the ustar header blocks for the extended headers.  The name
868      is obtained from STRING after making the following substitutions:
870      Meta-character    Replaced By
871      -------------------------------------------------------- 
872      %d                The directory name of the file,
873                        equivalent to the result of the
874                        `dirname' utility on the translated
875                        file name.
876      %f                The name of the file with the
877                        directory information stripped,
878                        equivalent to the result of the
879                        `basename' utility on the translated
880                        file name.
881      %p                The process ID of the `tar' process.
882      %%                A `%' character.
884      Any other `%' characters in STRING produce undefined results.
886      If no option `exthdr.name=string' is specified, `tar' will use the
887      following default value:
889           %d/PaxHeaders.%p/%f
891 `exthdr.mtime=VALUE'
892      This keyword defines the value of the `mtime' field that is
893      written into the ustar header blocks for the extended headers.  By
894      default, the `mtime' field is set to the modification time of the
895      archive member described by that extended headers.
897 `globexthdr.name=STRING'
898      This keyword allows user control over the name that is written into
899      the ustar header blocks for global extended header records.  The
900      name is obtained from the contents of STRING, after making the
901      following substitutions:
903      Meta-character    Replaced By
904      -------------------------------------------------------- 
905      %n                An integer that represents the
906                        sequence number of the global
907                        extended header record in the
908                        archive, starting at 1.
909      %p                The process ID of the `tar' process.
910      %%                A `%' character.
912      Any other `%' characters in STRING produce undefined results.
914      If no option `globexthdr.name=string' is specified, `tar' will use
915      the following default value:
917           $TMPDIR/GlobalHead.%p.%n
919      where `$TMPDIR' represents the value of the TMPDIR environment
920      variable.  If TMPDIR is not set, `tar' uses `/tmp'.
922 `globexthdr.mtime=VALUE'
923      This keyword defines the value of the `mtime' field that is
924      written into the ustar header blocks for the global extended
925      headers.  By default, the `mtime' field is set to the time when
926      `tar' was invoked.
928 `KEYWORD=VALUE'
929      When used with one of archive-creation commands, these
930      keyword/value pairs will be included at the beginning of the
931      archive in a global extended header record.  When used with one of
932      archive-reading commands, `tar' will behave as if it has
933      encountered these keyword/value pairs at the beginning of the
934      archive in a global extended header record.
936 `KEYWORD:=VALUE'
937      When used with one of archive-creation commands, these
938      keyword/value pairs will be included as records at the beginning
939      of an extended header for each file.  This is effectively
940      equivalent to KEYWORD=VALUE form except that it creates no global
941      extended header records.
943      When used with one of archive-reading commands, `tar' will behave
944      as if these keyword/value pairs were included as records at the
945      end of each extended header; thus, they will override any global or
946      file-specific extended header record keywords of the same names.
947      For example, in the command:
949           tar --format=posix --create \
950               --file archive --pax-option gname:=user .
952      the group name will be forced to a new value for all files stored
953      in the archive.
955    In any of the forms described above, the VALUE may be a string
956 enclosed in curly braces.  In that case, the string between the braces
957 is understood either as a textual time representation, as described in
958 *note Date input formats::, or a name of the existing file, starting
959 with `/' or `.'.  In the latter case, the modification time of that
960 file is used.
962    For example, to set all modification times to the current date, you
963 use the following option:
965      --pax-option='mtime:={now}'
967    Note quoting of the option's argument.
969    As another example, here is the option that ensures that any two
970 archives created using it, will be binary equivalent if they have the
971 same contents:
973      --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0
975 \x1f
976 File: tar.info,  Node: Checksumming,  Next: Large or Negative Values,  Prev: posix,  Up: Portability
978 8.3.8 Checksumming Problems
979 ---------------------------
981 SunOS and HP-UX `tar' fail to accept archives created using GNU `tar'
982 and containing non-ASCII file names, that is, file names having
983 characters with the eight bit set, because they use signed checksums,
984 while GNU `tar' uses unsigned checksums while creating archives, as per
985 POSIX standards.  On reading, GNU `tar' computes both checksums and
986 accepts any.  It is somewhat worrying that a lot of people may go
987 around doing backup of their files using faulty (or at least
988 non-standard) software, not learning about it until it's time to
989 restore their missing files with an incompatible file extractor, or
990 vice versa.
992    GNU `tar' computes checksums both ways, and accept any on read, so
993 GNU tar can read Sun tapes even with their wrong checksums.  GNU `tar'
994 produces the standard checksum, however, raising incompatibilities with
995 Sun.  That is to say, GNU `tar' has not been modified to _produce_
996 incorrect archives to be read by buggy `tar''s.  I've been told that
997 more recent Sun `tar' now read standard archives, so maybe Sun did a
998 similar patch, after all?
1000    The story seems to be that when Sun first imported `tar' sources on
1001 their system, they recompiled it without realizing that the checksums
1002 were computed differently, because of a change in the default signing
1003 of `char''s in their compiler.  So they started computing checksums
1004 wrongly.  When they later realized their mistake, they merely decided
1005 to stay compatible with it, and with themselves afterwards.
1006 Presumably, but I do not really know, HP-UX has chosen that their `tar'
1007 archives to be compatible with Sun's.  The current standards do not
1008 favor Sun `tar' format.  In any case, it now falls on the shoulders of
1009 SunOS and HP-UX users to get a `tar' able to read the good archives
1010 they receive.
1012 \x1f
1013 File: tar.info,  Node: Large or Negative Values,  Next: Other Tars,  Prev: Checksumming,  Up: Portability
1015 8.3.9 Large or Negative Values
1016 ------------------------------
1018      _(This message will disappear, once this node revised.)_
1020 The above sections suggest to use `oldest possible' archive format if
1021 in doubt.  However, sometimes it is not possible.  If you attempt to
1022 archive a file whose metadata cannot be represented using required
1023 format, GNU `tar' will print error message and ignore such a file.  You
1024 will than have to switch to a format that is able to handle such
1025 values.  The format summary table (*note Formats::) will help you to do
1028    In particular, when trying to archive files larger than 8GB or with
1029 timestamps not in the range 1970-01-01 00:00:00 through 2242-03-16
1030 12:56:31 UTC, you will have to chose between GNU and POSIX archive
1031 formats.  When considering which format to choose, bear in mind that
1032 the GNU format uses two's-complement base-256 notation to store values
1033 that do not fit into standard ustar range.  Such archives can generally
1034 be read only by a GNU `tar' implementation.  Moreover, they sometimes
1035 cannot be correctly restored on another hosts even by GNU `tar'.  For
1036 example, using two's complement representation for negative time stamps
1037 that assumes a signed 32-bit `time_t' generates archives that are not
1038 portable to hosts with differing `time_t' representations.
1040    On the other hand, POSIX archives, generally speaking, can be
1041 extracted by any tar implementation that understands older ustar
1042 format.  The only exception are files larger than 8GB.
1044 \x1f
1045 File: tar.info,  Node: Other Tars,  Prev: Large or Negative Values,  Up: Portability
1047 8.3.10 How to Extract GNU-Specific Data Using Other `tar' Implementations
1048 -------------------------------------------------------------------------
1050 In previous sections you became acquainted with various quirks
1051 necessary to make your archives portable.  Sometimes you may need to
1052 extract archives containing GNU-specific members using some third-party
1053 `tar' implementation or an older version of GNU `tar'.  Of course your
1054 best bet is to have GNU `tar' installed, but if it is for some reason
1055 impossible, this section will explain how to cope without it.
1057    When we speak about "GNU-specific" members we mean two classes of
1058 them: members split between the volumes of a multi-volume archive and
1059 sparse members.  You will be able to always recover such members if the
1060 archive is in PAX format.  In addition split members can be recovered
1061 from archives in old GNU format.  The following subsections describe
1062 the required procedures in detail.
1064 * Menu:
1066 * Split Recovery::       Members Split Between Volumes
1067 * Sparse Recovery::      Sparse Members
1069 \x1f
1070 File: tar.info,  Node: Split Recovery,  Next: Sparse Recovery,  Up: Other Tars
1072 8.3.10.1 Extracting Members Split Between Volumes
1073 .................................................
1075 If a member is split between several volumes of an old GNU format
1076 archive most third party `tar' implementation will fail to extract it.
1077 To extract it, use `tarcat' program (*note Tarcat::).  This program is
1078 available from GNU `tar' home page
1079 (http://www.gnu.org/software/tar/utils/tarcat.html).  It concatenates
1080 several archive volumes into a single valid archive.  For example, if
1081 you have three volumes named from `vol-1.tar' to `vol-3.tar', you can
1082 do the following to extract them using a third-party `tar':
1084      $ tarcat vol-1.tar vol-2.tar vol-3.tar | tar xf -
1086    You could use this approach for most (although not all) PAX format
1087 archives as well.  However, extracting split members from a PAX archive
1088 is a much easier task, because PAX volumes are constructed in such a
1089 way that each part of a split member is extracted to a different file
1090 by `tar' implementations that are not aware of GNU extensions.  More
1091 specifically, the very first part retains its original name, and all
1092 subsequent parts are named using the pattern:
1094      %d/GNUFileParts.%p/%f.%n
1096 where symbols preceeded by `%' are "macro characters" that have the
1097 following meaning:
1099 Meta-character     Replaced By
1100 ------------------------------------------------------------ 
1101 %d                 The directory name of the file,
1102                    equivalent to the result of the
1103                    `dirname' utility on its full name.
1104 %f                 The file name of the file, equivalent
1105                    to the result of the `basename' utility
1106                    on its full name.
1107 %p                 The process ID of the `tar' process that
1108                    created the archive.
1109 %n                 Ordinal number of this particular part.
1111    For example, if the file `var/longfile' was split during archive
1112 creation between three volumes, and the creator `tar' process had
1113 process ID `27962', then the member names will be:
1115      var/longfile
1116      var/GNUFileParts.27962/longfile.1
1117      var/GNUFileParts.27962/longfile.2
1119    When you extract your archive using a third-party `tar', these files
1120 will be created on your disk, and the only thing you will need to do to
1121 restore your file in its original form is concatenate them in the
1122 proper order, for example:
1124      $ cd var
1125      $ cat GNUFileParts.27962/longfile.1 \
1126        GNUFileParts.27962/longfile.2 >> longfile
1127      $ rm -f GNUFileParts.27962
1129    Notice, that if the `tar' implementation you use supports PAX format
1130 archives, it will probably emit warnings about unknown keywords during
1131 extraction.  They will look like this:
1133      Tar file too small
1134      Unknown extended header keyword 'GNU.volume.filename' ignored.
1135      Unknown extended header keyword 'GNU.volume.size' ignored.
1136      Unknown extended header keyword 'GNU.volume.offset' ignored.
1138 You can safely ignore these warnings.
1140    If your `tar' implementation is not PAX-aware, you will get more
1141 warnings and more files generated on your disk, e.g.:
1143      $ tar xf vol-1.tar
1144      var/PaxHeaders.27962/longfile: Unknown file type 'x', extracted as
1145      normal file
1146      Unexpected EOF in archive
1147      $ tar xf vol-2.tar
1148      tmp/GlobalHead.27962.1: Unknown file type 'g', extracted as normal file
1149      GNUFileParts.27962/PaxHeaders.27962/sparsefile.1: Unknown file type
1150      'x', extracted as normal file
1152    Ignore these warnings.  The `PaxHeaders.*' directories created will
1153 contain files with "extended header keywords" describing the extracted
1154 files.  You can delete them, unless they describe sparse members.  Read
1155 further to learn more about them.
1157 \x1f
1158 File: tar.info,  Node: Sparse Recovery,  Prev: Split Recovery,  Up: Other Tars
1160 8.3.10.2 Extracting Sparse Members
1161 ..................................
1163 Any `tar' implementation will be able to extract sparse members from a
1164 PAX archive.  However, the extracted files will be "condensed", i.e.,
1165 any zero blocks will be removed from them.  When we restore such a
1166 condensed file to its original form, by adding zero blocks (or "holes")
1167 back to their original locations, we call this process "expanding" a
1168 compressed sparse file.
1170    To expand a file, you will need a simple auxiliary program called
1171 `xsparse'.  It is available in source form from GNU `tar' home page
1172 (http://www.gnu.org/software/tar/utils/xsparse.html).
1174    Let's begin with archive members in "sparse format version 1.0"(1),
1175 which are the easiest to expand.  The condensed file will contain both
1176 file map and file data, so no additional data will be needed to restore
1177 it.  If the original file name was `DIR/NAME', then the condensed file
1178 will be named `DIR/GNUSparseFile.N/NAME', where N is a decimal
1179 number(2).
1181    To expand a version 1.0 file, run `xsparse' as follows:
1183      $ xsparse `cond-file'
1185 where `cond-file' is the name of the condensed file.  The utility will
1186 deduce the name for the resulting expanded file using the following
1187 algorithm:
1189   1. If `cond-file' does not contain any directories, `../cond-file'
1190      will be used;
1192   2. If `cond-file' has the form `DIR/T/NAME', where both T and NAME
1193      are simple names, with no `/' characters in them, the output file
1194      name will be `DIR/NAME'.
1196   3. Otherwise, if `cond-file' has the form `DIR/NAME', the output file
1197      name will be `NAME'.
1199    In the unlikely case when this algorithm does not suit your needs,
1200 you can explicitly specify output file name as a second argument to the
1201 command:
1203      $ xsparse `cond-file' `out-file'
1205    It is often a good idea to run `xsparse' in "dry run" mode first.
1206 In this mode, the command does not actually expand the file, but
1207 verbosely lists all actions it would be taking to do so.  The dry run
1208 mode is enabled by `-n' command line argument:
1210      $ xsparse -n /home/gray/GNUSparseFile.6058/sparsefile
1211      Reading v.1.0 sparse map
1212      Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1213      `/home/gray/sparsefile'
1214      Finished dry run
1216    To actually expand the file, you would run:
1218      $ xsparse /home/gray/GNUSparseFile.6058/sparsefile
1220 The program behaves the same way all UNIX utilities do: it will keep
1221 quiet unless it has simething important to tell you (e.g. an error
1222 condition or something).  If you wish it to produce verbose output,
1223 similar to that from the dry run mode, use `-v' option:
1225      $ xsparse -v /home/gray/GNUSparseFile.6058/sparsefile
1226      Reading v.1.0 sparse map
1227      Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1228      `/home/gray/sparsefile'
1229      Done
1231    Additionally, if your `tar' implementation has extracted the
1232 "extended headers" for this file, you can instruct `xstar' to use them
1233 in order to verify the integrity of the expanded file.  The option `-x'
1234 sets the name of the extended header file to use.  Continuing our
1235 example:
1237      $ xsparse -v -x /home/gray/PaxHeaders.6058/sparsefile \
1238        /home/gray/GNUSparseFile.6058/sparsefile
1239      Reading extended header file
1240      Found variable GNU.sparse.major = 1
1241      Found variable GNU.sparse.minor = 0
1242      Found variable GNU.sparse.name = sparsefile
1243      Found variable GNU.sparse.realsize = 217481216
1244      Reading v.1.0 sparse map
1245      Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1246      `/home/gray/sparsefile'
1247      Done
1249    An "extended header" is a special `tar' archive header that precedes
1250 an archive member and contains a set of "variables", describing the
1251 member properties that cannot be stored in the standard `ustar' header.
1252 While optional for expanding sparse version 1.0 members, the use of
1253 extended headers is mandatory when expanding sparse members in older
1254 sparse formats: v.0.0 and v.0.1 (The sparse formats are described in
1255 detail in *note Sparse Formats::.)  So, for these formats, the question
1256 is: how to obtain extended headers from the archive?
1258    If you use a `tar' implementation that does not support PAX format,
1259 extended headers for each member will be extracted as a separate file.
1260 If we represent the member name as `DIR/NAME', then the extended header
1261 file will be named `DIR/PaxHeaders.N/NAME', where N is an integer
1262 number.
1264    Things become more difficult if your `tar' implementation does
1265 support PAX headers, because in this case you will have to manually
1266 extract the headers.  We recommend the following algorithm:
1268   1. Consult the documentation of your `tar' implementation for an
1269      option that prints "block numbers" along with the archive listing
1270      (analogous to GNU `tar''s `-R' option).  For example, `star' has
1271      `-block-number'.
1273   2. Obtain verbose listing using the `block number' option, and find
1274      block numbers of the sparse member in question and the member
1275      immediately following it.  For example, running `star' on our
1276      archive we obtain:
1278           $ star -t -v -block-number -f arc.tar
1279           ...
1280           star: Unknown extended header keyword 'GNU.sparse.size' ignored.
1281           star: Unknown extended header keyword 'GNU.sparse.numblocks' ignored.
1282           star: Unknown extended header keyword 'GNU.sparse.name' ignored.
1283           star: Unknown extended header keyword 'GNU.sparse.map' ignored.
1284           block        56:  425984 -rw-r--r--  gray/users Jun 25 14:46 2006 GNUSparseFile.28124/sparsefile
1285           block       897:   65391 -rw-r--r--  gray/users Jun 24 20:06 2006 README
1286           ...
1288      (as usual, ignore the warnings about unknown keywords.)
1290   3. Let SIZE be the size of the sparse member, BS be its block number
1291      and BN be the block number of the next member.  Compute:
1293           N = BS - BN - SIZE/512 - 2
1295      This number gives the size of the extended header part in tar
1296      "blocks".  In our example, this formula gives: `897 - 56 - 425984
1297      / 512 - 2 = 7'.
1299   4. Use `dd' to extract the headers:
1301           dd if=ARCHIVE of=HNAME bs=512 skip=BS count=N
1303      where ARCHIVE is the archive name, HNAME is a name of the file to
1304      store the extended header in, BS and N are computed in previous
1305      steps.
1307      In our example, this command will be
1309           $ dd if=arc.tar of=xhdr bs=512 skip=56 count=7
1311    Finally, you can expand the condensed file, using the obtained
1312 header:
1314      $ xsparse -v -x xhdr GNUSparseFile.6058/sparsefile
1315      Reading extended header file
1316      Found variable GNU.sparse.size = 217481216
1317      Found variable GNU.sparse.numblocks = 208
1318      Found variable GNU.sparse.name = sparsefile
1319      Found variable GNU.sparse.map = 0,2048,1050624,2048,...
1320      Expanding file `GNUSparseFile.28124/sparsefile' to `sparsefile'
1321      Done
1323    ---------- Footnotes ----------
1325    (1) *Note PAX 1::.
1327    (2) Technically speaking, N is a "process ID" of the `tar' process
1328 which created the archive (*note PAX keywords::).
1330 \x1f
1331 File: tar.info,  Node: cpio,  Prev: Portability,  Up: Formats
1333 8.4 Comparison of `tar' and `cpio'
1334 ==================================
1336      _(This message will disappear, once this node revised.)_
1338 The `cpio' archive formats, like `tar', do have maximum file name
1339 lengths.  The binary and old ASCII formats have a maximum file length
1340 of 256, and the new ASCII and CRC ASCII formats have a max file length
1341 of 1024.  GNU `cpio' can read and write archives with arbitrary file
1342 name lengths, but other `cpio' implementations may crash unexplainedly
1343 trying to read them.
1345    `tar' handles symbolic links in the form in which it comes in BSD;
1346 `cpio' doesn't handle symbolic links in the form in which it comes in
1347 System V prior to SVR4, and some vendors may have added symlinks to
1348 their system without enhancing `cpio' to know about them.  Others may
1349 have enhanced it in a way other than the way I did it at Sun, and which
1350 was adopted by AT&T (and which is, I think, also present in the `cpio'
1351 that Berkeley picked up from AT&T and put into a later BSD release--I
1352 think I gave them my changes).
1354    (SVR4 does some funny stuff with `tar'; basically, its `cpio' can
1355 handle `tar' format input, and write it on output, and it probably
1356 handles symbolic links.  They may not have bothered doing anything to
1357 enhance `tar' as a result.)
1359    `cpio' handles special files; traditional `tar' doesn't.
1361    `tar' comes with V7, System III, System V, and BSD source; `cpio'
1362 comes only with System III, System V, and later BSD (4.3-tahoe and
1363 later).
1365    `tar''s way of handling multiple hard links to a file can handle
1366 file systems that support 32-bit i-numbers (e.g., the BSD file system);
1367 `cpio's way requires you to play some games (in its "binary" format,
1368 i-numbers are only 16 bits, and in its "portable ASCII" format, they're
1369 18 bits--it would have to play games with the "file system ID" field of
1370 the header to make sure that the file system ID/i-number pairs of
1371 different files were always different), and I don't know which `cpio's,
1372 if any, play those games.  Those that don't might get confused and
1373 think two files are the same file when they're not, and make hard links
1374 between them.
1376    `tar's way of handling multiple hard links to a file places only one
1377 copy of the link on the tape, but the name attached to that copy is the
1378 _only_ one you can use to retrieve the file; `cpio's way puts one copy
1379 for every link, but you can retrieve it using any of the names.
1381      What type of check sum (if any) is used, and how is this
1382      calculated.
1384    See the attached manual pages for `tar' and `cpio' format.  `tar'
1385 uses a checksum which is the sum of all the bytes in the `tar' header
1386 for a file; `cpio' uses no checksum.
1388      If anyone knows why `cpio' was made when `tar' was present at the
1389      unix scene,
1391    It wasn't.  `cpio' first showed up in PWB/UNIX 1.0; no
1392 generally-available version of UNIX had `tar' at the time.  I don't
1393 know whether any version that was generally available _within AT&T_ had
1394 `tar', or, if so, whether the people within AT&T who did `cpio' knew
1395 about it.
1397    On restore, if there is a corruption on a tape `tar' will stop at
1398 that point, while `cpio' will skip over it and try to restore the rest
1399 of the files.
1401    The main difference is just in the command syntax and header format.
1403    `tar' is a little more tape-oriented in that everything is blocked
1404 to start on a record boundary.
1406      Is there any differences between the ability to recover crashed
1407      archives between the two of them.  (Is there any chance of
1408      recovering crashed archives at all.)
1410    Theoretically it should be easier under `tar' since the blocking
1411 lets you find a header with some variation of `dd skip=NN'.  However,
1412 modern `cpio''s and variations have an option to just search for the
1413 next file header after an error with a reasonable chance of resyncing.
1414 However, lots of tape driver software won't allow you to continue past
1415 a media error which should be the only reason for getting out of sync
1416 unless a file changed sizes while you were writing the archive.
1418      If anyone knows why `cpio' was made when `tar' was present at the
1419      unix scene, please tell me about this too.
1421    Probably because it is more media efficient (by not blocking
1422 everything and using only the space needed for the headers where `tar'
1423 always uses 512 bytes per file header) and it knows how to archive
1424 special files.
1426    You might want to look at the freely available alternatives.  The
1427 major ones are `afio', GNU `tar', and `pax', each of which have their
1428 own extensions with some backwards compatibility.
1430    Sparse files were `tar'red as sparse files (which you can easily
1431 test, because the resulting archive gets smaller, and GNU `cpio' can no
1432 longer read it).
1434 \x1f
1435 File: tar.info,  Node: Media,  Next: Reliability and security,  Prev: Formats,  Up: Top
1437 9 Tapes and Other Archive Media
1438 *******************************
1440      _(This message will disappear, once this node revised.)_
1442 A few special cases about tape handling warrant more detailed
1443 description.  These special cases are discussed below.
1445    Many complexities surround the use of `tar' on tape drives.  Since
1446 the creation and manipulation of archives located on magnetic tape was
1447 the original purpose of `tar', it contains many features making such
1448 manipulation easier.
1450    Archives are usually written on dismountable media--tape cartridges,
1451 mag tapes, or floppy disks.
1453    The amount of data a tape or disk holds depends not only on its size,
1454 but also on how it is formatted.  A 2400 foot long reel of mag tape
1455 holds 40 megabytes of data when formatted at 1600 bits per inch.  The
1456 physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
1458    Magnetic media are re-usable--once the archive on a tape is no longer
1459 needed, the archive can be erased and the tape or disk used over.
1460 Media quality does deteriorate with use, however.  Most tapes or disks
1461 should be discarded when they begin to produce data errors.  EXABYTE
1462 tape cartridges should be discarded when they generate an "error count"
1463 (number of non-usable bits) of more than 10k.
1465    Magnetic media are written and erased using magnetic fields, and
1466 should be protected from such fields to avoid damage to stored data.
1467 Sticking a floppy disk to a filing cabinet using a magnet is probably
1468 not a good idea.
1470 * Menu:
1472 * Device::                      Device selection and switching
1473 * Remote Tape Server::
1474 * Common Problems and Solutions::
1475 * Blocking::                    Blocking
1476 * Many::                        Many archives on one tape
1477 * Using Multiple Tapes::        Using Multiple Tapes
1478 * label::                       Including a Label in the Archive
1479 * verify::
1480 * Write Protection::
1482 \x1f
1483 File: tar.info,  Node: Device,  Next: Remote Tape Server,  Up: Media
1485 9.1 Device Selection and Switching
1486 ==================================
1488      _(This message will disappear, once this node revised.)_
1490 `-f [HOSTNAME:]FILE'
1491 `--file=[HOSTNAME:]FILE'
1492      Use archive file or device FILE on HOSTNAME.
1494    This option is used to specify the file name of the archive `tar'
1495 works on.
1497    If the file name is `-', `tar' reads the archive from standard input
1498 (when listing or extracting), or writes it to standard output (when
1499 creating).  If the `-' file name is given when updating an archive,
1500 `tar' will read the original archive from its standard input, and will
1501 write the entire new archive to its standard output.
1503    If the file name contains a `:', it is interpreted as `hostname:file
1504 name'.  If the HOSTNAME contains an "at" sign (`@'), it is treated as
1505 `user@hostname:file name'.  In either case, `tar' will invoke the
1506 command `rsh' (or `remsh') to start up an `/usr/libexec/rmt' on the
1507 remote machine.  If you give an alternate login name, it will be given
1508 to the `rsh'.  Naturally, the remote machine must have an executable
1509 `/usr/libexec/rmt'.  This program is free software from the University
1510 of California, and a copy of the source code can be found with the
1511 sources for `tar'; it's compiled and installed by default.  The exact
1512 path to this utility is determined when configuring the package.  It is
1513 `PREFIX/libexec/rmt', where PREFIX stands for your installation prefix.
1514 This location may also be overridden at runtime by using the
1515 `--rmt-command=COMMAND' option (*Note --rmt-command: Option Summary,
1516 for detailed description of this option.  *Note Remote Tape Server::,
1517 for the description of `rmt' command).
1519    If this option is not given, but the environment variable `TAPE' is
1520 set, its value is used; otherwise, old versions of `tar' used a default
1521 archive name (which was picked when `tar' was compiled).  The default
1522 is normally set up to be the "first" tape drive or other transportable
1523 I/O medium on the system.
1525    Starting with version 1.11.5, GNU `tar' uses standard input and
1526 standard output as the default device, and I will not try anymore
1527 supporting automatic device detection at installation time.  This was
1528 failing really in too many cases, it was hopeless.  This is now
1529 completely left to the installer to override standard input and
1530 standard output for default device, if this seems preferable.  Further,
1531 I think _most_ actual usages of `tar' are done with pipes or disks, not
1532 really tapes, cartridges or diskettes.
1534    Some users think that using standard input and output is running
1535 after trouble.  This could lead to a nasty surprise on your screen if
1536 you forget to specify an output file name--especially if you are going
1537 through a network or terminal server capable of buffering large amounts
1538 of output.  We had so many bug reports in that area of configuring
1539 default tapes automatically, and so many contradicting requests, that
1540 we finally consider the problem to be portably intractable.  We could
1541 of course use something like `/dev/tape' as a default, but this is
1542 _also_ running after various kind of trouble, going from hung processes
1543 to accidental destruction of real tapes.  After having seen all this
1544 mess, using standard input and output as a default really sounds like
1545 the only clean choice left, and a very useful one too.
1547    GNU `tar' reads and writes archive in records, I suspect this is the
1548 main reason why block devices are preferred over character devices.
1549 Most probably, block devices are more efficient too.  The installer
1550 could also check for `DEFTAPE' in `<sys/mtio.h>'.
1552 `--force-local'
1553      Archive file is local even if it contains a colon.
1555 `--rsh-command=COMMAND'
1556      Use remote COMMAND instead of `rsh'.  This option exists so that
1557      people who use something other than the standard `rsh' (e.g., a
1558      Kerberized `rsh') can access a remote device.
1560      When this command is not used, the shell command found when the
1561      `tar' program was installed is used instead.  This is the first
1562      found of `/usr/ucb/rsh', `/usr/bin/remsh', `/usr/bin/rsh',
1563      `/usr/bsd/rsh' or `/usr/bin/nsh'.  The installer may have
1564      overridden this by defining the environment variable `RSH' _at
1565      installation time_.
1567 `-[0-7][lmh]'
1568      Specify drive and density.
1570 `-M'
1571 `--multi-volume'
1572      Create/list/extract multi-volume archive.
1574      This option causes `tar' to write a "multi-volume" archive--one
1575      that may be larger than will fit on the medium used to hold it.
1576      *Note Multi-Volume Archives::.
1578 `-L NUM'
1579 `--tape-length=SIZE[SUF]'
1580      Change tape after writing SIZE units of data.  Unless SUF is
1581      given, SIZE is treated as kilobytes, i.e. `SIZE x 1024' bytes.
1582      The following suffixes alter this behavior:
1584      Suffix        Units                Byte Equivalent
1585      -------------------------------------------------------- 
1586      b             Blocks               SIZE x 512
1587      B             Kilobytes            SIZE x 1024
1588      c             Bytes                SIZE
1589      G             Gigabytes            SIZE x 1024^3
1590      K             Kilobytes            SIZE x 1024
1591      k             Kilobytes            SIZE x 1024
1592      M             Megabytes            SIZE x 1024^2
1593      P             Petabytes            SIZE x 1024^5
1594      T             Terabytes            SIZE x 1024^4
1595      w             Words                SIZE x 2
1597      Table 9.1: Size Suffixes
1599         This option might be useful when your tape drivers do not
1600      properly detect end of physical tapes.  By being slightly
1601      conservative on the maximum tape length, you might avoid the
1602      problem entirely.
1604   `-F FILE'
1605   `--info-script=FILE'
1606   `--new-volume-script=FILE'
1607         Execute `file' at end of each tape.  This implies
1608      `--multi-volume' (`-M').  *Note info-script::, for a detailed
1609      description of this option.
1611 \x1f
1612 File: tar.info,  Node: Remote Tape Server,  Next: Common Problems and Solutions,  Prev: Device,  Up: Media
1614 9.2 Remote Tape Server
1615 ======================
1617 In order to access the tape drive on a remote machine, `tar' uses the
1618 remote tape server written at the University of California at Berkeley.
1619 The remote tape server must be installed as `PREFIX/libexec/rmt' on any
1620 machine whose tape drive you want to use.  `tar' calls `rmt' by running
1621 an `rsh' or `remsh' to the remote machine, optionally using a different
1622 login name if one is supplied.
1624    A copy of the source for the remote tape server is provided.  It is
1625 Copyright (C) 1983 by the Regents of the University of California, but
1626 can be freely distributed.  It is compiled and installed by default.
1628    Unless you use the `--absolute-names' (`-P') option, GNU `tar' will
1629 not allow you to create an archive that contains absolute file names (a
1630 file name beginning with `/'.) If you try, `tar' will automatically
1631 remove the leading `/' from the file names it stores in the archive.
1632 It will also type a warning message telling you what it is doing.
1634    When reading an archive that was created with a different `tar'
1635 program, GNU `tar' automatically extracts entries in the archive which
1636 have absolute file names as if the file names were not absolute.  This
1637 is an important feature.  A visitor here once gave a `tar' tape to an
1638 operator to restore; the operator used Sun `tar' instead of GNU `tar',
1639 and the result was that it replaced large portions of our `/bin' and
1640 friends with versions from the tape; needless to say, we were unhappy
1641 about having to recover the file system from backup tapes.
1643    For example, if the archive contained a file `/usr/bin/computoy',
1644 GNU `tar' would extract the file to `usr/bin/computoy', relative to the
1645 current directory.  If you want to extract the files in an archive to
1646 the same absolute names that they had when the archive was created, you
1647 should do a `cd /' before extracting the files from the archive, or you
1648 should either use the `--absolute-names' option, or use the command
1649 `tar -C / ...'.
1651    Some versions of Unix (Ultrix 3.1 is known to have this problem),
1652 can claim that a short write near the end of a tape succeeded, when it
1653 actually failed.  This will result in the -M option not working
1654 correctly.  The best workaround at the moment is to use a significantly
1655 larger blocking factor than the default 20.
1657    In order to update an archive, `tar' must be able to backspace the
1658 archive in order to reread or rewrite a record that was just read (or
1659 written).  This is currently possible only on two kinds of files: normal
1660 disk files (or any other file that can be backspaced with `lseek'), and
1661 industry-standard 9-track magnetic tape (or any other kind of tape that
1662 can be backspaced with the `MTIOCTOP' `ioctl').
1664    This means that the `--append', `--concatenate', and `--delete'
1665 commands will not work on any other kind of file.  Some media simply
1666 cannot be backspaced, which means these commands and options will never
1667 be able to work on them.  These non-backspacing media include pipes and
1668 cartridge tape drives.
1670    Some other media can be backspaced, and `tar' will work on them once
1671 `tar' is modified to do so.
1673    Archives created with the `--multi-volume', `--label', and
1674 `--incremental' (`-G') options may not be readable by other version of
1675 `tar'.  In particular, restoring a file that was split over a volume
1676 boundary will require some careful work with `dd', if it can be done at
1677 all.  Other versions of `tar' may also create an empty file whose name
1678 is that of the volume header.  Some versions of `tar' may create normal
1679 files instead of directories archived with the `--incremental' (`-G')
1680 option.
1682 \x1f
1683 File: tar.info,  Node: Common Problems and Solutions,  Next: Blocking,  Prev: Remote Tape Server,  Up: Media
1685 9.3 Some Common Problems and their Solutions
1686 ============================================
1688 errors from system:
1689 permission denied
1690 no such file or directory
1691 not owner
1693 errors from `tar':
1694 directory checksum error
1695 header format error
1697 errors from media/system:
1698 i/o error
1699 device busy
1701 \x1f
1702 File: tar.info,  Node: Blocking,  Next: Many,  Prev: Common Problems and Solutions,  Up: Media
1704 9.4 Blocking
1705 ============
1707 "Block" and "record" terminology is rather confused, and it is also
1708 confusing to the expert reader.  On the other hand, readers who are new
1709 to the field have a fresh mind, and they may safely skip the next two
1710 paragraphs, as the remainder of this manual uses those two terms in a
1711 quite consistent way.
1713    John Gilmore, the writer of the public domain `tar' from which GNU
1714 `tar' was originally derived, wrote (June 1995):
1716      The nomenclature of tape drives comes from IBM, where I believe
1717      they were invented for the IBM 650 or so.  On IBM mainframes, what
1718      is recorded on tape are tape blocks.  The logical organization of
1719      data is into records.  There are various ways of putting records
1720      into blocks, including `F' (fixed sized records), `V' (variable
1721      sized records), `FB' (fixed blocked: fixed size records, N to a
1722      block), `VB' (variable size records, N to a block), `VSB'
1723      (variable spanned blocked: variable sized records that can occupy
1724      more than one block), etc.  The `JCL' `DD RECFORM=' parameter
1725      specified this to the operating system.
1727      The Unix man page on `tar' was totally confused about this.  When
1728      I wrote `PD TAR', I used the historically correct terminology
1729      (`tar' writes data records, which are grouped into blocks).  It
1730      appears that the bogus terminology made it into POSIX (no surprise
1731      here), and now Franc,ois has migrated that terminology back into
1732      the source code too.
1734    The term "physical block" means the basic transfer chunk from or to
1735 a device, after which reading or writing may stop without anything
1736 being lost.  In this manual, the term "block" usually refers to a disk
1737 physical block, _assuming_ that each disk block is 512 bytes in length.
1738 It is true that some disk devices have different physical blocks, but
1739 `tar' ignore these differences in its own format, which is meant to be
1740 portable, so a `tar' block is always 512 bytes in length, and "block"
1741 always mean a `tar' block.  The term "logical block" often represents
1742 the basic chunk of allocation of many disk blocks as a single entity,
1743 which the operating system treats somewhat atomically; this concept is
1744 only barely used in GNU `tar'.
1746    The term "physical record" is another way to speak of a physical
1747 block, those two terms are somewhat interchangeable.  In this manual,
1748 the term "record" usually refers to a tape physical block, _assuming_
1749 that the `tar' archive is kept on magnetic tape.  It is true that
1750 archives may be put on disk or used with pipes, but nevertheless, `tar'
1751 tries to read and write the archive one "record" at a time, whatever
1752 the medium in use.  One record is made up of an integral number of
1753 blocks, and this operation of putting many disk blocks into a single
1754 tape block is called "reblocking", or more simply, "blocking".  The
1755 term "logical record" refers to the logical organization of many
1756 characters into something meaningful to the application.  The term
1757 "unit record" describes a small set of characters which are transmitted
1758 whole to or by the application, and often refers to a line of text.
1759 Those two last terms are unrelated to what we call a "record" in GNU
1760 `tar'.
1762    When writing to tapes, `tar' writes the contents of the archive in
1763 chunks known as "records".  To change the default blocking factor, use
1764 the `--blocking-factor=512-SIZE' (`-b 512-SIZE') option.  Each record
1765 will then be composed of 512-SIZE blocks.  (Each `tar' block is 512
1766 bytes.  *Note Standard::.)  Each file written to the archive uses at
1767 least one full record.  As a result, using a larger record size can
1768 result in more wasted space for small files.  On the other hand, a
1769 larger record size can often be read and written much more efficiently.
1771    Further complicating the problem is that some tape drives ignore the
1772 blocking entirely.  For these, a larger record size can still improve
1773 performance (because the software layers above the tape drive still
1774 honor the blocking), but not as dramatically as on tape drives that
1775 honor blocking.
1777    When reading an archive, `tar' can usually figure out the record
1778 size on itself.  When this is the case, and a non-standard record size
1779 was used when the archive was created, `tar' will print a message about
1780 a non-standard blocking factor, and then operate normally.  On some
1781 tape devices, however, `tar' cannot figure out the record size itself.
1782 On most of those, you can specify a blocking factor (with
1783 `--blocking-factor') larger than the actual blocking factor, and then
1784 use the `--read-full-records' (`-B') option.  (If you specify a
1785 blocking factor with `--blocking-factor' and don't use the
1786 `--read-full-records' option, then `tar' will not attempt to figure out
1787 the recording size itself.)  On some devices, you must always specify
1788 the record size exactly with `--blocking-factor' when reading, because
1789 `tar' cannot figure it out.  In any case, use `--list' (`-t') before
1790 doing any extractions to see whether `tar' is reading the archive
1791 correctly.
1793    `tar' blocks are all fixed size (512 bytes), and its scheme for
1794 putting them into records is to put a whole number of them (one or
1795 more) into each record.  `tar' records are all the same size; at the
1796 end of the file there's a block containing all zeros, which is how you
1797 tell that the remainder of the last record(s) are garbage.
1799    In a standard `tar' file (no options), the block size is 512 and the
1800 record size is 10240, for a blocking factor of 20.  What the
1801 `--blocking-factor' option does is sets the blocking factor, changing
1802 the record size while leaving the block size at 512 bytes.  20 was fine
1803 for ancient 800 or 1600 bpi reel-to-reel tape drives; most tape drives
1804 these days prefer much bigger records in order to stream and not waste
1805 tape.  When writing tapes for myself, some tend to use a factor of the
1806 order of 2048, say, giving a record size of around one megabyte.
1808    If you use a blocking factor larger than 20, older `tar' programs
1809 might not be able to read the archive, so we recommend this as a limit
1810 to use in practice.  GNU `tar', however, will support arbitrarily large
1811 record sizes, limited only by the amount of virtual memory or the
1812 physical characteristics of the tape device.
1814 * Menu:
1816 * Format Variations::           Format Variations
1817 * Blocking Factor::             The Blocking Factor of an Archive
1819 \x1f
1820 File: tar.info,  Node: Format Variations,  Next: Blocking Factor,  Up: Blocking
1822 9.4.1 Format Variations
1823 -----------------------
1825      _(This message will disappear, once this node revised.)_
1827 Format parameters specify how an archive is written on the archive
1828 media.  The best choice of format parameters will vary depending on the
1829 type and number of files being archived, and on the media used to store
1830 the archive.
1832    To specify format parameters when accessing or creating an archive,
1833 you can use the options described in the following sections.  If you do
1834 not specify any format parameters, `tar' uses default parameters.  You
1835 cannot modify a compressed archive.  If you create an archive with the
1836 `--blocking-factor' option specified (*note Blocking Factor::), you
1837 must specify that blocking-factor when operating on the archive.  *Note
1838 Formats::, for other examples of format parameter considerations.
1840 \x1f
1841 File: tar.info,  Node: Blocking Factor,  Prev: Format Variations,  Up: Blocking
1843 9.4.2 The Blocking Factor of an Archive
1844 ---------------------------------------
1846      _(This message will disappear, once this node revised.)_
1848 The data in an archive is grouped into blocks, which are 512 bytes.
1849 Blocks are read and written in whole number multiples called "records".
1850 The number of blocks in a record (i.e., the size of a record in units
1851 of 512 bytes) is called the "blocking factor".  The
1852 `--blocking-factor=512-SIZE' (`-b 512-SIZE') option specifies the
1853 blocking factor of an archive.  The default blocking factor is
1854 typically 20 (i.e., 10240 bytes), but can be specified at installation.
1855 To find out the blocking factor of an existing archive, use `tar --list
1856 --file=ARCHIVE-NAME'.  This may not work on some devices.
1858    Records are separated by gaps, which waste space on the archive
1859 media.  If you are archiving on magnetic tape, using a larger blocking
1860 factor (and therefore larger records) provides faster throughput and
1861 allows you to fit more data on a tape (because there are fewer gaps).
1862 If you are archiving on cartridge, a very large blocking factor (say
1863 126 or more) greatly increases performance.  A smaller blocking factor,
1864 on the other hand, may be useful when archiving small files, to avoid
1865 archiving lots of nulls as `tar' fills out the archive to the end of
1866 the record.  In general, the ideal record size depends on the size of
1867 the inter-record gaps on the tape you are using, and the average size
1868 of the files you are archiving.  *Note create::, for information on
1869 writing archives.
1871    Archives with blocking factors larger than 20 cannot be read by very
1872 old versions of `tar', or by some newer versions of `tar' running on
1873 old machines with small address spaces.  With GNU `tar', the blocking
1874 factor of an archive is limited only by the maximum record size of the
1875 device containing the archive, or by the amount of available virtual
1876 memory.
1878    Also, on some systems, not using adequate blocking factors, as
1879 sometimes imposed by the device drivers, may yield unexpected
1880 diagnostics.  For example, this has been reported:
1882      Cannot write to /dev/dlt: Invalid argument
1884 In such cases, it sometimes happen that the `tar' bundled by the system
1885 is aware of block size idiosyncrasies, while GNU `tar' requires an
1886 explicit specification for the block size, which it cannot guess.  This
1887 yields some people to consider GNU `tar' is misbehaving, because by
1888 comparison, `the bundle `tar' works OK'.  Adding `-b 256', for example,
1889 might resolve the problem.
1891    If you use a non-default blocking factor when you create an archive,
1892 you must specify the same blocking factor when you modify that archive.
1893 Some archive devices will also require you to specify the blocking
1894 factor when reading that archive, however this is not typically the
1895 case.  Usually, you can use `--list' (`-t') without specifying a
1896 blocking factor--`tar' reports a non-default record size and then lists
1897 the archive members as it would normally.  To extract files from an
1898 archive with a non-standard blocking factor (particularly if you're not
1899 sure what the blocking factor is), you can usually use the
1900 `--read-full-records' (`-B') option while specifying a blocking factor
1901 larger then the blocking factor of the archive (i.e., `tar --extract
1902 --read-full-records --blocking-factor=300').  *Note list::, for more
1903 information on the `--list' (`-t') operation.  *Note Reading::, for a
1904 more detailed explanation of that option.
1906 `--blocking-factor=NUMBER'
1907 `-b NUMBER'
1908      Specifies the blocking factor of an archive.  Can be used with any
1909      operation, but is usually not necessary with `--list' (`-t').
1911    Device blocking
1913 `-b BLOCKS'
1914 `--blocking-factor=BLOCKS'
1915      Set record size to BLOCKS*512 bytes.
1917      This option is used to specify a "blocking factor" for the archive.
1918      When reading or writing the archive, `tar', will do reads and
1919      writes of the archive in records of BLOCK*512 bytes.  This is true
1920      even when the archive is compressed.  Some devices requires that
1921      all write operations be a multiple of a certain size, and so, `tar'
1922      pads the archive out to the next record boundary.
1924      The default blocking factor is set when `tar' is compiled, and is
1925      typically 20.  Blocking factors larger than 20 cannot be read by
1926      very old versions of `tar', or by some newer versions of `tar'
1927      running on old machines with small address spaces.
1929      With a magnetic tape, larger records give faster throughput and fit
1930      more data on a tape (because there are fewer inter-record gaps).
1931      If the archive is in a disk file or a pipe, you may want to specify
1932      a smaller blocking factor, since a large one will result in a large
1933      number of null bytes at the end of the archive.
1935      When writing cartridge or other streaming tapes, a much larger
1936      blocking factor (say 126 or more) will greatly increase
1937      performance.  However, you must specify the same blocking factor
1938      when reading or updating the archive.
1940      Apparently, Exabyte drives have a physical block size of 8K bytes.
1941      If we choose our blocksize as a multiple of 8k bytes, then the
1942      problem seems to disappear.  Id est, we are using block size of
1943      112 right now, and we haven't had the problem since we switched...
1945      With GNU `tar' the blocking factor is limited only by the maximum
1946      record size of the device containing the archive, or by the amount
1947      of available virtual memory.
1949      However, deblocking or reblocking is virtually avoided in a special
1950      case which often occurs in practice, but which requires all the
1951      following conditions to be simultaneously true:
1952         * the archive is subject to a compression option,
1954         * the archive is not handled through standard input or output,
1955           nor redirected nor piped,
1957         * the archive is directly handled to a local disk, instead of
1958           any special device,
1960         * `--blocking-factor' is not explicitly specified on the `tar'
1961           invocation.
1963      If the output goes directly to a local disk, and not through
1964      stdout, then the last write is not extended to a full record size.
1965      Otherwise, reblocking occurs.  Here are a few other remarks on this
1966      topic:
1968         * `gzip' will complain about trailing garbage if asked to
1969           uncompress a compressed archive on tape, there is an option
1970           to turn the message off, but it breaks the regularity of
1971           simply having to use `PROG -d' for decompression.  It would
1972           be nice if gzip was silently ignoring any number of trailing
1973           zeros.  I'll ask Jean-loup Gailly, by sending a copy of this
1974           message to him.
1976         * `compress' does not show this problem, but as Jean-loup
1977           pointed out to Michael, `compress -d' silently adds garbage
1978           after the result of decompression, which tar ignores because
1979           it already recognized its end-of-file indicator.  So this bug
1980           may be safely ignored.
1982         * `gzip -d -q' will be silent about the trailing zeros indeed,
1983           but will still return an exit status of 2 which tar reports
1984           in turn.  `tar' might ignore the exit status returned, but I
1985           hate doing that, as it weakens the protection `tar' offers
1986           users against other possible problems at decompression time.
1987           If `gzip' was silently skipping trailing zeros _and_ also
1988           avoiding setting the exit status in this innocuous case, that
1989           would solve this situation.
1991         * `tar' should become more solid at not stopping to read a pipe
1992           at the first null block encountered.  This inelegantly breaks
1993           the pipe.  `tar' should rather drain the pipe out before
1994           exiting itself.
1996 `-i'
1997 `--ignore-zeros'
1998      Ignore blocks of zeros in archive (means EOF).
2000      The `--ignore-zeros' (`-i') option causes `tar' to ignore blocks
2001      of zeros in the archive.  Normally a block of zeros indicates the
2002      end of the archive, but when reading a damaged archive, or one
2003      which was created by concatenating several archives together, this
2004      option allows `tar' to read the entire archive.  This option is
2005      not on by default because many versions of `tar' write garbage
2006      after the zeroed blocks.
2008      Note that this option causes `tar' to read to the end of the
2009      archive file, which may sometimes avoid problems when multiple
2010      files are stored on a single physical tape.
2012 `-B'
2013 `--read-full-records'
2014      Reblock as we read (for reading 4.2BSD pipes).
2016      If `--read-full-records' is used, `tar' will not panic if an
2017      attempt to read a record from the archive does not return a full
2018      record.  Instead, `tar' will keep reading until it has obtained a
2019      full record.
2021      This option is turned on by default when `tar' is reading an
2022      archive from standard input, or from a remote machine.  This is
2023      because on BSD Unix systems, a read of a pipe will return however
2024      much happens to be in the pipe, even if it is less than `tar'
2025      requested.  If this option was not used, `tar' would fail as soon
2026      as it read an incomplete record from the pipe.
2028      This option is also useful with the commands for updating an
2029      archive.
2032    Tape blocking
2034    When handling various tapes or cartridges, you have to take care of
2035 selecting a proper blocking, that is, the number of disk blocks you put
2036 together as a single tape block on the tape, without intervening tape
2037 gaps.  A "tape gap" is a small landing area on the tape with no
2038 information on it, used for decelerating the tape to a full stop, and
2039 for later regaining the reading or writing speed.  When the tape driver
2040 starts reading a record, the record has to be read whole without
2041 stopping, as a tape gap is needed to stop the tape motion without
2042 losing information.
2044    Using higher blocking (putting more disk blocks per tape block) will
2045 use the tape more efficiently as there will be less tape gaps.  But
2046 reading such tapes may be more difficult for the system, as more memory
2047 will be required to receive at once the whole record.  Further, if
2048 there is a reading error on a huge record, this is less likely that the
2049 system will succeed in recovering the information.  So, blocking should
2050 not be too low, nor it should be too high.  `tar' uses by default a
2051 blocking of 20 for historical reasons, and it does not really matter
2052 when reading or writing to disk.  Current tape technology would easily
2053 accommodate higher blockings.  Sun recommends a blocking of 126 for
2054 Exabytes and 96 for DATs.  We were told that for some DLT drives, the
2055 blocking should be a multiple of 4Kb, preferably 64Kb (`-b 128') or 256
2056 for decent performance.  Other manufacturers may use different
2057 recommendations for the same tapes.  This might also depends of the
2058 buffering techniques used inside modern tape controllers.  Some imposes
2059 a minimum blocking, or a maximum blocking.  Others request blocking to
2060 be some exponent of two.
2062    So, there is no fixed rule for blocking.  But blocking at read time
2063 should ideally be the same as blocking used at write time.  At one place
2064 I know, with a wide variety of equipment, they found it best to use a
2065 blocking of 32 to guarantee that their tapes are fully interchangeable.
2067    I was also told that, for recycled tapes, prior erasure (by the same
2068 drive unit that will be used to create the archives) sometimes lowers
2069 the error rates observed at rewriting time.
2071    I might also use `--number-blocks' instead of `--block-number', so
2072 `--block' will then expand to `--blocking-factor' unambiguously.
2074 \x1f
2075 File: tar.info,  Node: Many,  Next: Using Multiple Tapes,  Prev: Blocking,  Up: Media
2077 9.5 Many Archives on One Tape
2078 =============================
2080 Most tape devices have two entries in the `/dev' directory, or entries
2081 that come in pairs, which differ only in the minor number for this
2082 device.  Let's take for example `/dev/tape', which often points to the
2083 only or usual tape device of a given system.  There might be a
2084 corresponding `/dev/nrtape' or `/dev/ntape'.  The simpler name is the
2085 _rewinding_ version of the device, while the name having `nr' in it is
2086 the _no rewinding_ version of the same device.
2088    A rewinding tape device will bring back the tape to its beginning
2089 point automatically when this device is opened or closed.  Since `tar'
2090 opens the archive file before using it and closes it afterwards, this
2091 means that a simple:
2093      $ tar cf /dev/tape DIRECTORY
2095 will reposition the tape to its beginning both prior and after saving
2096 DIRECTORY contents to it, thus erasing prior tape contents and making
2097 it so that any subsequent write operation will destroy what has just
2098 been saved.
2100    So, a rewinding device is normally meant to hold one and only one
2101 file.  If you want to put more than one `tar' archive on a given tape,
2102 you will need to avoid using the rewinding version of the tape device.
2103 You will also have to pay special attention to tape positioning.
2104 Errors in positioning may overwrite the valuable data already on your
2105 tape.  Many people, burnt by past experiences, will only use rewinding
2106 devices and limit themselves to one file per tape, precisely to avoid
2107 the risk of such errors.  Be fully aware that writing at the wrong
2108 position on a tape loses all information past this point and most
2109 probably until the end of the tape, and this destroyed information
2110 _cannot_ be recovered.
2112    To save DIRECTORY-1 as a first archive at the beginning of a tape,
2113 and leave that tape ready for a second archive, you should use:
2115      $ mt -f /dev/nrtape rewind
2116      $ tar cf /dev/nrtape DIRECTORY-1
2118    "Tape marks" are special magnetic patterns written on the tape
2119 media, which are later recognizable by the reading hardware.  These
2120 marks are used after each file, when there are many on a single tape.
2121 An empty file (that is to say, two tape marks in a row) signal the
2122 logical end of the tape, after which no file exist.  Usually,
2123 non-rewinding tape device drivers will react to the close request issued
2124 by `tar' by first writing two tape marks after your archive, and by
2125 backspacing over one of these.  So, if you remove the tape at that time
2126 from the tape drive, it is properly terminated.  But if you write
2127 another file at the current position, the second tape mark will be
2128 erased by the new information, leaving only one tape mark between files.
2130    So, you may now save DIRECTORY-2 as a second archive after the first
2131 on the same tape by issuing the command:
2133      $ tar cf /dev/nrtape DIRECTORY-2
2135 and so on for all the archives you want to put on the same tape.
2137    Another usual case is that you do not write all the archives the same
2138 day, and you need to remove and store the tape between two archive
2139 sessions.  In general, you must remember how many files are already
2140 saved on your tape.  Suppose your tape already has 16 files on it, and
2141 that you are ready to write the 17th.  You have to take care of skipping
2142 the first 16 tape marks before saving DIRECTORY-17, say, by using these
2143 commands:
2145      $ mt -f /dev/nrtape rewind
2146      $ mt -f /dev/nrtape fsf 16
2147      $ tar cf /dev/nrtape DIRECTORY-17
2149    In all the previous examples, we put aside blocking considerations,
2150 but you should do the proper things for that as well.  *Note Blocking::.
2152 * Menu:
2154 * Tape Positioning::            Tape Positions and Tape Marks
2155 * mt::                          The `mt' Utility
2157 \x1f
2158 File: tar.info,  Node: Tape Positioning,  Next: mt,  Up: Many
2160 9.5.1 Tape Positions and Tape Marks
2161 -----------------------------------
2163      _(This message will disappear, once this node revised.)_
2165 Just as archives can store more than one file from the file system,
2166 tapes can store more than one archive file.  To keep track of where
2167 archive files (or any other type of file stored on tape) begin and end,
2168 tape archive devices write magnetic "tape marks" on the archive media.
2169 Tape drives write one tape mark between files, two at the end of all
2170 the file entries.
2172    If you think of data as a series of records "rrrr"'s, and tape marks
2173 as "*"'s, a tape might look like the following:
2175      rrrr*rrrrrr*rrrrr*rr*rrrrr**-------------------------
2177    Tape devices read and write tapes using a read/write "tape head"--a
2178 physical part of the device which can only access one point on the tape
2179 at a time.  When you use `tar' to read or write archive data from a
2180 tape device, the device will begin reading or writing from wherever on
2181 the tape the tape head happens to be, regardless of which archive or
2182 what part of the archive the tape head is on.  Before writing an
2183 archive, you should make sure that no data on the tape will be
2184 overwritten (unless it is no longer needed).  Before reading an
2185 archive, you should make sure the tape head is at the beginning of the
2186 archive you want to read.  You can do it manually via `mt' utility
2187 (*note mt::).  The `restore' script does that automatically (*note
2188 Scripted Restoration::).
2190    If you want to add new archive file entries to a tape, you should
2191 advance the tape to the end of the existing file entries, backspace
2192 over the last tape mark, and write the new archive file.  If you were
2193 to add two archives to the example above, the tape might look like the
2194 following:
2196      rrrr*rrrrrr*rrrrr*rr*rrrrr*rrr*rrrr**----------------
2198 \x1f
2199 File: tar.info,  Node: mt,  Prev: Tape Positioning,  Up: Many
2201 9.5.2 The `mt' Utility
2202 ----------------------
2204      _(This message will disappear, once this node revised.)_
2206 *Note Blocking Factor::.
2208    You can use the `mt' utility to advance or rewind a tape past a
2209 specified number of archive files on the tape.  This will allow you to
2210 move to the beginning of an archive before extracting or reading it, or
2211 to the end of all the archives before writing a new one.
2213    The syntax of the `mt' command is:
2215      mt [-f TAPENAME] OPERATION [NUMBER]
2217    where TAPENAME is the name of the tape device, NUMBER is the number
2218 of times an operation is performed (with a default of one), and
2219 OPERATION is one of the following:
2221 `eof'
2222 `weof'
2223      Writes NUMBER tape marks at the current position on the tape.
2225 `fsf'
2226      Moves tape position forward NUMBER files.
2228 `bsf'
2229      Moves tape position back NUMBER files.
2231 `rewind'
2232      Rewinds the tape.  (Ignores NUMBER.)
2234 `offline'
2235 `rewoff1'
2236      Rewinds the tape and takes the tape device off-line.  (Ignores
2237      NUMBER.)
2239 `status'
2240      Prints status information about the tape unit.
2243    If you don't specify a TAPENAME, `mt' uses the environment variable
2244 `TAPE'; if `TAPE' is not set, `mt' will use the default device
2245 specified in your `sys/mtio.h' file (`DEFTAPE' variable).  If this is
2246 not defined, the program will display a descriptive error message and
2247 exit with code 1.
2249    `mt' returns a 0 exit status when the operation(s) were successful,
2250 1 if the command was unrecognized, and 2 if an operation failed.
2252 \x1f
2253 File: tar.info,  Node: Using Multiple Tapes,  Next: label,  Prev: Many,  Up: Media
2255 9.6 Using Multiple Tapes
2256 ========================
2258 Often you might want to write a large archive, one larger than will fit
2259 on the actual tape you are using.  In such a case, you can run multiple
2260 `tar' commands, but this can be inconvenient, particularly if you are
2261 using options like `--exclude=PATTERN' or dumping entire file systems.
2262 Therefore, `tar' provides a special mode for creating multi-volume
2263 archives.
2265    "Multi-volume" archive is a single `tar' archive, stored on several
2266 media volumes of fixed size.  Although in this section we will often
2267 call `volume' a "tape", there is absolutely no requirement for
2268 multi-volume archives to be stored on tapes.  Instead, they can use
2269 whatever media type the user finds convenient, they can even be located
2270 on files.
2272    When creating a multi-volume archive, GNU `tar' continues to fill
2273 current volume until it runs out of space, then it switches to next
2274 volume (usually the operator is queried to replace the tape on this
2275 point), and continues working on the new volume.  This operation
2276 continues until all requested files are dumped.  If GNU `tar' detects
2277 end of media while dumping a file, such a file is archived in split
2278 form.  Some very big files can even be split across several volumes.
2280    Each volume is itself a valid GNU `tar' archive, so it can be read
2281 without any special options.  Consequently any file member residing
2282 entirely on one volume can be extracted or otherwise operated upon
2283 without needing the other volume.  Sure enough, to extract a split
2284 member you would need all volumes its parts reside on.
2286    Multi-volume archives suffer from several limitations.  In
2287 particular, they cannot be compressed.
2289    GNU `tar' is able to create multi-volume archives of two formats
2290 (*note Formats::): `GNU' and `POSIX'.
2292 * Menu:
2294 * Multi-Volume Archives::       Archives Longer than One Tape or Disk
2295 * Tape Files::                  Tape Files
2296 * Tarcat::                      Concatenate Volumes into a Single Archive
2298 \x1f
2299 File: tar.info,  Node: Multi-Volume Archives,  Next: Tape Files,  Up: Using Multiple Tapes
2301 9.6.1 Archives Longer than One Tape or Disk
2302 -------------------------------------------
2304 To create an archive that is larger than will fit on a single unit of
2305 the media, use the `--multi-volume' (`-M') option in conjunction with
2306 the `--create' option (*note create::).  A "multi-volume" archive can
2307 be manipulated like any other archive (provided the `--multi-volume'
2308 option is specified), but is stored on more than one tape or file.
2310    When you specify `--multi-volume', `tar' does not report an error
2311 when it comes to the end of an archive volume (when reading), or the
2312 end of the media (when writing).  Instead, it prompts you to load a new
2313 storage volume.  If the archive is on a magnetic tape, you should
2314 change tapes when you see the prompt; if the archive is on a floppy
2315 disk, you should change disks; etc.
2317 `--multi-volume'
2318 `-M'
2319      Creates a multi-volume archive, when used in conjunction with
2320      `--create' (`-c').  To perform any other operation on a
2321      multi-volume archive, specify `--multi-volume' in conjunction with
2322      that operation.  For example:
2324           $ tar --create --multi-volume --file=/dev/tape FILES
2326    The method `tar' uses to detect end of tape is not perfect, and
2327 fails on some operating systems or on some devices.  If `tar' cannot
2328 detect the end of the tape itself, you can use `--tape-length' option
2329 to inform it about the capacity of the tape:
2331 `--tape-length=SIZE[SUF]'
2332 `-L SIZE[SUF]'
2333      Set maximum length of a volume.  The SUF, if given, specifies
2334      units in which SIZE is expressed, e.g. `2M' mean 2 megabytes
2335      (*note Table 9.1: size-suffixes, for a list of allowed size
2336      suffixes).  Without SUF, units of 1024 bytes (kilobyte) are
2337      assumed.
2339      This option selects `--multi-volume' automatically.  For example:
2341           $ tar --create --tape-length=41943040 --file=/dev/tape FILES
2343      or, which is equivalent:
2345           $ tar --create --tape-length=4G --file=/dev/tape FILES
2347    When GNU `tar' comes to the end of a storage media, it asks you to
2348 change the volume.  The built-in prompt for POSIX locale is(1):
2350      Prepare volume #N for `ARCHIVE' and hit return:
2352 where N is the ordinal number of the volume to be created and ARCHIVE
2353 is archive file or device name.
2355    When prompting for a new tape, `tar' accepts any of the following
2356 responses:
2359      Request `tar' to explain possible responses.
2362      Request `tar' to exit immediately.
2364 `n FILE-NAME'
2365      Request `tar' to write the next volume on the file FILE-NAME.
2368      Request `tar' to run a subshell.  This option can be disabled by
2369      giving `--restrict' command line option to `tar'(2).
2372      Request `tar' to begin writing the next volume.
2374    (You should only type `y' after you have changed the tape; otherwise
2375 `tar' will write over the volume it just finished.)
2377    The volume number used by `tar' in its tape-changing prompt can be
2378 changed; if you give the `--volno-file=FILE-OF-NUMBER' option, then
2379 FILE-OF-NUMBER should be an non-existing file to be created, or else, a
2380 file already containing a decimal number.  That number will be used as
2381 the volume number of the first volume written.  When `tar' is finished,
2382 it will rewrite the file with the now-current volume number. (This does
2383 not change the volume number written on a tape label, as per *note
2384 label::, it _only_ affects the number used in the prompt.)
2386    If you want more elaborate behavior than this, you can write a
2387 special "new volume script", that will be responsible for changing the
2388 volume, and instruct `tar' to use it instead of its normal prompting
2389 procedure:
2391 `--info-script=SCRIPT-NAME'
2392 `--new-volume-script=SCRIPT-NAME'
2393 `-F SCRIPT-NAME'
2394      Specify the full name of the volume script to use.  The script can
2395      be used to eject cassettes, or to broadcast messages such as
2396      `Someone please come change my tape' when performing unattended
2397      backups.
2399    The SCRIPT-NAME is executed without any command line arguments.  It
2400 inherits `tar''s shell environment.  Additional data is passed to it
2401 via the following environment variables:
2403 `TAR_VERSION'
2404      GNU `tar' version number.
2406 `TAR_ARCHIVE'
2407      The name of the archive `tar' is processing.
2409 `TAR_BLOCKING_FACTOR'
2410      Current blocking factor (*note Blocking::).
2412 `TAR_VOLUME'
2413      Ordinal number of the volume `tar' is about to start.
2415 `TAR_SUBCOMMAND'
2416      A short option describing the operation `tar' is executing.  *Note
2417      Operations::, for a complete list of subcommand options.
2419 `TAR_FORMAT'
2420      Format of the archive being processed. *Note Formats::, for a
2421      complete list of archive format names.
2423 `TAR_FD'
2424      File descriptor which can be used to communicate the new volume
2425      name to `tar'.
2427    The volume script can instruct `tar' to use new archive name, by
2428 writing in to file descriptor `$TAR_FD' (see below for an example).
2430    If the info script fails, `tar' exits; otherwise, it begins writing
2431 the next volume.
2433    If you want `tar' to cycle through a series of files or tape drives,
2434 there are three approaches to choose from.  First of all, you can give
2435 `tar' multiple `--file' options.  In this case the specified files will
2436 be used, in sequence, as the successive volumes of the archive.  Only
2437 when the first one in the sequence needs to be used again will `tar'
2438 prompt for a tape change (or run the info script).  For example,
2439 suppose someone has two tape drives on a system named `/dev/tape0' and
2440 `/dev/tape1'.  For having GNU `tar' to switch to the second drive when
2441 it needs to write the second tape, and then back to the first tape,
2442 etc., just do either of:
2444      $ tar --create --multi-volume --file=/dev/tape0 --file=/dev/tape1 FILES
2445      $ tar cMff /dev/tape0 /dev/tape1 FILES
2447    The second method is to use the `n' response to the tape-change
2448 prompt.
2450    Finally, the most flexible approach is to use a volume script, that
2451 writes new archive name to the file descriptor `$TAR_FD'.  For example,
2452 the following volume script will create a series of archive files, named
2453 `ARCHIVE-VOL', where ARCHIVE is the name of the archive being created
2454 (as given by `--file' option) and VOL is the ordinal number of the
2455 archive being created:
2457      #! /bin/sh
2458      echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.
2460      name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
2461      case $TAR_SUBCOMMAND in
2462      -c)       ;;
2463      -d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
2464                ;;
2465      *)        exit 1
2466      esac
2468      echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD
2470    The same script can be used while listing, comparing or extracting
2471 from the created archive.  For example:
2473      # Create a multi-volume archive:
2474      $ tar -c -L1024 -f archive.tar -F new-volume .
2475      # Extract from the created archive:
2476      $ tar -x -f archive.tar -F new-volume .
2478 Notice, that the first command had to use `-L' option, since otherwise
2479 GNU `tar' will end up writing everything to file `archive.tar'.
2481    You can read each individual volume of a multi-volume archive as if
2482 it were an archive by itself.  For example, to list the contents of one
2483 volume, use `--list', without `--multi-volume' specified.  To extract
2484 an archive member from one volume (assuming it is described that
2485 volume), use `--extract', again without `--multi-volume'.
2487    If an archive member is split across volumes (i.e., its entry begins
2488 on one volume of the media and ends on another), you need to specify
2489 `--multi-volume' to extract it successfully.  In this case, you should
2490 load the volume where the archive member starts, and use `tar --extract
2491 --multi-volume'--`tar' will prompt for later volumes as it needs them.
2492 *Note extracting archives::, for more information about extracting
2493 archives.
2495    Multi-volume archives can be modified like any other archive.  To add
2496 files to a multi-volume archive, you need to only mount the last volume
2497 of the archive media (and new volumes, if needed).  For all other
2498 operations, you need to use the entire archive.
2500    If a multi-volume archive was labeled using `--label=ARCHIVE-LABEL'
2501 (*note label::) when it was created, `tar' will not automatically label
2502 volumes which are added later.  To label subsequent volumes, specify
2503 `--label=ARCHIVE-LABEL' again in conjunction with the `--append',
2504 `--update' or `--concatenate' operation.
2506    Notice that multi-volume support is a GNU extension and the archives
2507 created in this mode should be read only using GNU `tar'.  If you
2508 absolutely have to process such archives using a third-party `tar'
2509 implementation, read *note Split Recovery::.
2511    ---------- Footnotes ----------
2513    (1) If you run GNU `tar' under a different locale, the translation
2514 to the locale's language will be used.
2516    (2) *Note --restrict::, for more information about this option.
2518 \x1f
2519 File: tar.info,  Node: Tape Files,  Next: Tarcat,  Prev: Multi-Volume Archives,  Up: Using Multiple Tapes
2521 9.6.2 Tape Files
2522 ----------------
2524      _(This message will disappear, once this node revised.)_
2526 To give the archive a name which will be recorded in it, use the
2527 `--label=VOLUME-LABEL' (`-V VOLUME-LABEL') option.  This will write a
2528 special block identifying VOLUME-LABEL as the name of the archive to
2529 the front of the archive which will be displayed when the archive is
2530 listed with `--list'.  If you are creating a multi-volume archive with
2531 `--multi-volume' (*note Using Multiple Tapes::), then the volume label
2532 will have `Volume NNN' appended to the name you give, where NNN is the
2533 number of the volume of the archive.  If you use the
2534 `--label=VOLUME-LABEL' option when reading an archive, it checks to
2535 make sure the label on the tape matches the one you gave.  *Note
2536 label::.
2538    When `tar' writes an archive to tape, it creates a single tape file.
2539 If multiple archives are written to the same tape, one after the other,
2540 they each get written as separate tape files.  When extracting, it is
2541 necessary to position the tape at the right place before running `tar'.
2542 To do this, use the `mt' command.  For more information on the `mt'
2543 command and on the organization of tapes into a sequence of tape files,
2544 see *note mt::.
2546    People seem to often do:
2548      --label="SOME-PREFIX `date +SOME-FORMAT`"
2550    or such, for pushing a common date in all volumes or an archive set.
2552 \x1f
2553 File: tar.info,  Node: Tarcat,  Prev: Tape Files,  Up: Using Multiple Tapes
2555 9.6.3 Concatenate Volumes into a Single Archive
2556 -----------------------------------------------
2558 Sometimes it is necessary to convert existing GNU `tar' multi-volume
2559 archive to a single `tar' archive.  Simply concatenating all volumes
2560 into one will not work, since each volume carries an additional
2561 information at the beginning.  GNU `tar' is shipped with the shell
2562 script `tarcat' designed for this purpose.
2564    The script takes a list of files comprising a multi-volume archive
2565 and creates the resulting archive at the standard output.  For example:
2567      tarcat vol.1 vol.2 vol.3 | tar tf -
2569    The script implements a simple heuristics to determine the format of
2570 the first volume file and to decide how to process the rest of the
2571 files.  However, it makes no attempt to verify whether the files are
2572 given in order or even if they are valid `tar' archives.  It uses `dd'
2573 and does not filter its standard error, so you will usually see lots of
2574 spurious messages.
2576 \x1f
2577 File: tar.info,  Node: label,  Next: verify,  Prev: Using Multiple Tapes,  Up: Media
2579 9.7 Including a Label in the Archive
2580 ====================================
2582 To avoid problems caused by misplaced paper labels on the archive
2583 media, you can include a "label" entry -- an archive member which
2584 contains the name of the archive -- in the archive itself.  Use the
2585 `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') option(1) in conjunction
2586 with the `--create' operation to include a label entry in the archive
2587 as it is being created.
2589 `--label=ARCHIVE-LABEL'
2590 `-V ARCHIVE-LABEL'
2591      Includes an "archive-label" at the beginning of the archive when
2592      the archive is being created, when used in conjunction with the
2593      `--create' operation.  Checks to make sure the archive label
2594      matches the one specified (when used in conjunction with any other
2595      operation).
2597    If you create an archive using both `--label=ARCHIVE-LABEL' (`-V
2598 ARCHIVE-LABEL') and `--multi-volume' (`-M'), each volume of the archive
2599 will have an archive label of the form `ARCHIVE-LABEL Volume N', where
2600 N is 1 for the first volume, 2 for the next, and so on. *Note Using
2601 Multiple Tapes::, for information on creating multiple volume archives.
2603    The volume label will be displayed by `--list' along with the file
2604 contents.  If verbose display is requested, it will also be explicitly
2605 marked as in the example below:
2607      $ tar --verbose --list --file=iamanarchive
2608      V--------- 0/0               0 1992-03-07 12:01 iamalabel--Volume Header--
2609      -rw-r--r-- ringo/user       40 1990-05-21 13:30 iamafilename
2611    However, `--list' option will cause listing entire contents of the
2612 archive, which may be undesirable (for example, if the archive is
2613 stored on a tape).  You can request checking only the volume label by
2614 specifying `--test-label' option.  This option reads only the first
2615 block of an archive, so it can be used with slow storage devices.  For
2616 example:
2618      $ tar --test-label --file=iamanarchive
2619      iamalabel
2621    If `--test-label' is used with one or more command line arguments,
2622 `tar' compares the volume label with each argument.  It exits with code
2623 0 if a match is found, and with code 1 otherwise(2).  No output is
2624 displayed, unless you also used the `--verbose' option.  For example:
2626      $ tar --test-label --file=iamanarchive 'iamalabel'
2627      => 0
2628      $ tar --test-label --file=iamanarchive 'alabel'
2629      => 1
2631    When used with the `--verbose' option, `tar' prints the actual
2632 volume label (if any), and a verbose diagnostics in case of a mismatch:
2634      $ tar --test-label --verbose --file=iamanarchive 'iamalabel'
2635      iamalabel
2636      => 0
2637      $ tar --test-label --verbose --file=iamanarchive 'alabel'
2638      iamalabel
2639      tar: Archive label mismatch
2640      => 1
2642    If you request any operation, other than `--create', along with
2643 using `--label' option, `tar' will first check if the archive label
2644 matches the one specified and will refuse to proceed if it does not.
2645 Use this as a safety precaution to avoid accidentally overwriting
2646 existing archives.  For example, if you wish to add files to `archive',
2647 presumably labeled with string `My volume', you will get:
2649      $ tar -rf archive --label 'My volume' .
2650      tar: Archive not labeled to match `My volume'
2652 in case its label does not match.  This will work even if `archive' is
2653 not labeled at all.
2655    Similarly, `tar' will refuse to list or extract the archive if its
2656 label doesn't match the ARCHIVE-LABEL specified.  In those cases,
2657 ARCHIVE-LABEL argument is interpreted as a globbing-style pattern which
2658 must match the actual magnetic volume label.  *Note exclude::, for a
2659 precise description of how match is attempted(3).  If the switch
2660 `--multi-volume' (`-M') is being used, the volume label matcher will
2661 also suffix ARCHIVE-LABEL by ` Volume [1-9]*' if the initial match
2662 fails, before giving up.  Since the volume numbering is automatically
2663 added in labels at creation time, it sounded logical to equally help
2664 the user taking care of it when the archive is being read.
2666    You can also use `--label' to get a common information on all tapes
2667 of a series.  For having this information different in each series
2668 created through a single script used on a regular basis, just manage to
2669 get some date string as part of the label.  For example:
2671      $ tar cfMV /dev/tape "Daily backup for `date +%Y-%m-%d`"
2672      $ tar --create --file=/dev/tape --multi-volume \
2673           --label="Daily backup for `date +%Y-%m-%d`"
2675    Some more notes about volume labels:
2677    * Each label has its own date and time, which corresponds to the
2678      time when GNU `tar' initially attempted to write it, often soon
2679      after the operator launches `tar' or types the carriage return
2680      telling that the next tape is ready.
2682    * Comparing date labels to get an idea of tape throughput is
2683      unreliable.  It gives correct results only if the delays for
2684      rewinding tapes and the operator switching them were negligible,
2685      which is usually not the case.
2687    ---------- Footnotes ----------
2689    (1) Until version 1.10, that option was called `--volume', but is
2690 not available under that name anymore.
2692    (2) Note that GNU `tar' versions up to 1.23 indicated mismatch with
2693 an exit code 2 and printed a spurious diagnostics on stderr.
2695    (3) Previous versions of `tar' used full regular expression
2696 matching, or before that, only exact string matching, instead of
2697 wildcard matchers.  We decided for the sake of simplicity to use a
2698 uniform matching device through `tar'.
2700 \x1f
2701 File: tar.info,  Node: verify,  Next: Write Protection,  Prev: label,  Up: Media
2703 9.8 Verifying Data as It is Stored
2704 ==================================
2706 `-W'
2707 `--verify'
2708      Attempt to verify the archive after writing.
2710    This option causes `tar' to verify the archive after writing it.
2711 Each volume is checked after it is written, and any discrepancies are
2712 recorded on the standard error output.
2714    Verification requires that the archive be on a back-space-able
2715 medium.  This means pipes, some cartridge tape drives, and some other
2716 devices cannot be verified.
2718    You can insure the accuracy of an archive by comparing files in the
2719 system with archive members.  `tar' can compare an archive to the file
2720 system as the archive is being written, to verify a write operation, or
2721 can compare a previously written archive, to insure that it is up to
2722 date.
2724    To check for discrepancies in an archive immediately after it is
2725 written, use the `--verify' (`-W') option in conjunction with the
2726 `--create' operation.  When this option is specified, `tar' checks
2727 archive members against their counterparts in the file system, and
2728 reports discrepancies on the standard error.
2730    To verify an archive, you must be able to read it from before the end
2731 of the last written entry.  This option is useful for detecting data
2732 errors on some tapes.  Archives written to pipes, some cartridge tape
2733 drives, and some other devices cannot be verified.
2735    One can explicitly compare an already made archive with the file
2736 system by using the `--compare' (`--diff', `-d') option, instead of
2737 using the more automatic `--verify' option.  *Note compare::.
2739    Note that these two options have a slightly different intent.  The
2740 `--compare' option checks how identical are the logical contents of some
2741 archive with what is on your disks, while the `--verify' option is
2742 really for checking if the physical contents agree and if the recording
2743 media itself is of dependable quality.  So, for the `--verify'
2744 operation, `tar' tries to defeat all in-memory cache pertaining to the
2745 archive, while it lets the speed optimization undisturbed for the
2746 `--compare' option.  If you nevertheless use `--compare' for media
2747 verification, you may have to defeat the in-memory cache yourself,
2748 maybe by opening and reclosing the door latch of your recording unit,
2749 forcing some doubt in your operating system about the fact this is
2750 really the same volume as the one just written or read.
2752    The `--verify' option would not be necessary if drivers were indeed
2753 able to detect dependably all write failures.  This sometimes require
2754 many magnetic heads, some able to read after the writes occurred.  One
2755 would not say that drivers unable to detect all cases are necessarily
2756 flawed, as long as programming is concerned.
2758    The `--verify' (`-W') option will not work in conjunction with the
2759 `--multi-volume' (`-M') option or the `--append' (`-r'), `--update'
2760 (`-u') and `--delete' operations.  *Note Operations::, for more
2761 information on these operations.
2763    Also, since `tar' normally strips leading `/' from file names (*note
2764 absolute::), a command like `tar --verify -cf /tmp/foo.tar /etc' will
2765 work as desired only if the working directory is `/', as `tar' uses the
2766 archive's relative member names (e.g., `etc/motd') when verifying the
2767 archive.
2769 \x1f
2770 File: tar.info,  Node: Write Protection,  Prev: verify,  Up: Media
2772 9.9 Write Protection
2773 ====================
2775 Almost all tapes and diskettes, and in a few rare cases, even disks can
2776 be "write protected", to protect data on them from being changed.  Once
2777 an archive is written, you should write protect the media to prevent
2778 the archive from being accidentally overwritten or deleted.  (This will
2779 protect the archive from being changed with a tape or floppy drive--it
2780 will not protect it from magnet fields or other physical hazards.)
2782    The write protection device itself is usually an integral part of the
2783 physical media, and can be a two position (write enabled/write
2784 disabled) switch, a notch which can be popped out or covered, a ring
2785 which can be removed from the center of a tape reel, or some other
2786 changeable feature.
2788 \x1f
2789 File: tar.info,  Node: Reliability and security,  Next: Changes,  Prev: Media,  Up: Top
2791 10 Reliability and Security
2792 ***************************
2794 The `tar' command reads and writes files as any other application does,
2795 and is subject to the usual caveats about reliability and security.
2796 This section contains some commonsense advice on the topic.
2798 * Menu:
2800 * Reliability::
2801 * Security::
2803 \x1f
2804 File: tar.info,  Node: Reliability,  Next: Security,  Up: Reliability and security
2806 10.1 Reliability
2807 ================
2809 Ideally, when `tar' is creating an archive, it reads from a file system
2810 that is not being modified, and encounters no errors or inconsistencies
2811 while reading and writing.  If this is the case, the archive should
2812 faithfully reflect what was read.  Similarly, when extracting from an
2813 archive, ideally `tar' ideally encounters no errors and the extracted
2814 files faithfully reflect what was in the archive.
2816    However, when reading or writing real-world file systems, several
2817 things can go wrong; these include permissions problems, corruption of
2818 data, and race conditions.
2820 * Menu:
2822 * Permissions problems::
2823 * Data corruption and repair::
2824 * Race conditions::
2826 \x1f
2827 File: tar.info,  Node: Permissions problems,  Next: Data corruption and repair,  Up: Reliability
2829 10.1.1 Permissions Problems
2830 ---------------------------
2832 If `tar' encounters errors while reading or writing files, it normally
2833 reports an error and exits with nonzero status.  The work it does may
2834 therefore be incomplete.  For example, when creating an archive, if
2835 `tar' cannot read a file then it cannot copy the file into the archive.
2837 \x1f
2838 File: tar.info,  Node: Data corruption and repair,  Next: Race conditions,  Prev: Permissions problems,  Up: Reliability
2840 10.1.2 Data Corruption and Repair
2841 ---------------------------------
2843 If an archive becomes corrupted by an I/O error, this may corrupt the
2844 data in an extracted file.  Worse, it may corrupt the file's metadata,
2845 which may cause later parts of the archive to become misinterpreted.
2846 An tar-format archive contains a checksum that most likely will detect
2847 errors in the metadata, but it will not detect errors in the data.
2849    If data corruption is a concern, you can compute and check your own
2850 checksums of an archive by using other programs, such as `cksum'.
2852    When attempting to recover from a read error or data corruption in an
2853 archive, you may need to skip past the questionable data and read the
2854 rest of the archive.  This requires some expertise in the archive
2855 format and in other software tools.
2857 \x1f
2858 File: tar.info,  Node: Race conditions,  Prev: Data corruption and repair,  Up: Reliability
2860 10.1.3 Race conditions
2861 ----------------------
2863 If some other process is modifying the file system while `tar' is
2864 reading or writing files, the result may well be inconsistent due to
2865 race conditions.  For example, if another process creates some files in
2866 a directory while `tar' is creating an archive containing the
2867 directory's files, `tar' may see some of the files but not others, or
2868 it may see a file that is in the process of being created.  The
2869 resulting archive may not be a snapshot of the file system at any point
2870 in time.  If an application such as a database system depends on an
2871 accurate snapshot, restoring from the `tar' archive of a live file
2872 system may therefore break that consistency and may break the
2873 application.  The simplest way to avoid the consistency issues is to
2874 avoid making other changes to the file system while tar is reading it
2875 or writing it.
2877    When creating an archive, several options are available to avoid race
2878 conditions.  Some hosts have a way of snapshotting a file system, or of
2879 temporarily suspending all changes to a file system, by (say)
2880 suspending the only virtual machine that can modify a file system; if
2881 you use these facilities and have `tar -c' read from a snapshot when
2882 creating an archive, you can avoid inconsistency problems.  More
2883 drastically, before starting `tar' you could suspend or shut down all
2884 processes other than `tar' that have access to the file system, or you
2885 could unmount the file system and then mount it read-only.
2887    When extracting from an archive, one approach to avoid race
2888 conditions is to create a directory that no other process can write to,
2889 and extract into that.
2891 \x1f
2892 File: tar.info,  Node: Security,  Prev: Reliability,  Up: Reliability and security
2894 10.2 Security
2895 =============
2897 In some cases `tar' may be used in an adversarial situation, where an
2898 untrusted user is attempting to gain information about or modify
2899 otherwise-inaccessible files.  Dealing with untrusted data (that is,
2900 data generated by an untrusted user) typically requires extra care,
2901 because even the smallest mistake in the use of `tar' is more likely to
2902 be exploited by an adversary than by a race condition.
2904 * Menu:
2906 * Privacy::
2907 * Integrity::
2908 * Live untrusted data::
2909 * Security rules of thumb::
2911 \x1f
2912 File: tar.info,  Node: Privacy,  Next: Integrity,  Up: Security
2914 10.2.1 Privacy
2915 --------------
2917 Standard privacy concerns apply when using `tar'.  For example, suppose
2918 you are archiving your home directory into a file
2919 `/archive/myhome.tar'.  Any secret information in your home directory,
2920 such as your SSH secret keys, are copied faithfully into the archive.
2921 Therefore, if your home directory contains any file that should not be
2922 read by some other user, the archive itself should be not be readable
2923 by that user.  And even if the archive's data are inaccessible to
2924 untrusted users, its metadata (such as size or last-modified date) may
2925 reveal some information about your home directory; if the metadata are
2926 intended to be private, the archive's parent directory should also be
2927 inaccessible to untrusted users.
2929    One precaution is to create `/archive' so that it is not accessible
2930 to any user, unless that user also has permission to access all the
2931 files in your home directory.
2933    Similarly, when extracting from an archive, take care that the
2934 permissions of the extracted files are not more generous than what you
2935 want.  Even if the archive itself is readable only to you, files
2936 extracted from it have their own permissions that may differ.
2938 \x1f
2939 File: tar.info,  Node: Integrity,  Next: Live untrusted data,  Prev: Privacy,  Up: Security
2941 10.2.2 Integrity
2942 ----------------
2944 When creating archives, take care that they are not writable by a
2945 untrusted user; otherwise, that user could modify the archive, and when
2946 you later extract from the archive you will get incorrect data.
2948    When `tar' extracts from an archive, by default it writes into files
2949 relative to the working directory.  If the archive was generated by an
2950 untrusted user, that user therefore can write into any file under the
2951 working directory.  If the working directory contains a symbolic link
2952 to another directory, the untrusted user can also write into any file
2953 under the referenced directory.  When extracting from an untrusted
2954 archive, it is therefore good practice to create an empty directory and
2955 run `tar' in that directory.
2957    When extracting from two or more untrusted archives, each one should
2958 be extracted independently, into different empty directories.
2959 Otherwise, the first archive could create a symbolic link into an area
2960 outside the working directory, and the second one could follow the link
2961 and overwrite data that is not under the working directory.  For
2962 example, when restoring from a series of incremental dumps, the
2963 archives should have been created by a trusted process, as otherwise
2964 the incremental restores might alter data outside the working directory.
2966    If you use the `--absolute-names' (`-P') option when extracting,
2967 `tar' respects any file names in the archive, even file names that
2968 begin with `/' or contain `..'.  As this lets the archive overwrite any
2969 file in your system that you can write, the `--absolute-names' (`-P')
2970 option should be used only for trusted archives.
2972    Conversely, with the `--keep-old-files' (`-k') option, `tar' refuses
2973 to replace existing files when extracting; and with the
2974 `--no-overwrite-dir' option, `tar' refuses to replace the permissions
2975 or ownership of already-existing directories.  These options may help
2976 when extracting from untrusted archives.
2978 \x1f
2979 File: tar.info,  Node: Live untrusted data,  Next: Security rules of thumb,  Prev: Integrity,  Up: Security
2981 10.2.3 Dealing with Live Untrusted Data
2982 ---------------------------------------
2984 Extra care is required when creating from or extracting into a file
2985 system that is accessible to untrusted users.  For example, superusers
2986 who invoke `tar' must be wary about its actions being hijacked by an
2987 adversary who is reading or writing the file system at the same time
2988 that `tar' is operating.
2990    When creating an archive from a live file system, `tar' is
2991 vulnerable to denial-of-service attacks.  For example, an adversarial
2992 user could create the illusion of an indefinitely-deep directory
2993 hierarchy `d/e/f/g/...' by creating directories one step ahead of
2994 `tar', or the illusion of an indefinitely-long file by creating a
2995 sparse file but arranging for blocks to be allocated just before `tar'
2996 reads them.  There is no easy way for `tar' to distinguish these
2997 scenarios from legitimate uses, so you may need to monitor `tar', just
2998 as you'd need to monitor any other system service, to detect such
2999 attacks.
3001    While a superuser is extracting from an archive into a live file
3002 system, an untrusted user might replace a directory with a symbolic
3003 link, in hopes that `tar' will follow the symbolic link and extract
3004 data into files that the untrusted user does not have access to.  Even
3005 if the archive was generated by the superuser, it may contain a file
3006 such as `d/etc/passwd' that the untrusted user earlier created in order
3007 to break in; if the untrusted user replaces the directory `d/etc' with
3008 a symbolic link to `/etc' while `tar' is running, `tar' will overwrite
3009 `/etc/passwd'.  This attack can be prevented by extracting into a
3010 directory that is inaccessible to untrusted users.
3012    Similar attacks via symbolic links are also possible when creating an
3013 archive, if the untrusted user can modify an ancestor of a top-level
3014 argument of `tar'.  For example, an untrusted user that can modify
3015 `/home/eve' can hijack a running instance of `tar -cf -
3016 /home/eve/Documents/yesterday' by replacing `/home/eve/Documents' with
3017 a symbolic link to some other location.  Attacks like these can be
3018 prevented by making sure that untrusted users cannot modify any files
3019 that are top-level arguments to `tar', or any ancestor directories of
3020 these files.
3022 \x1f
3023 File: tar.info,  Node: Security rules of thumb,  Prev: Live untrusted data,  Up: Security
3025 10.2.4 Security Rules of Thumb
3026 ------------------------------
3028 This section briefly summarizes rules of thumb for avoiding security
3029 pitfalls.
3031    * Protect archives at least as much as you protect any of the files
3032      being archived.
3034    * Extract from an untrusted archive only into an otherwise-empty
3035      directory.  This directory and its parent should be accessible
3036      only to trusted users.  For example:
3038           $ chmod go-rwx .
3039           $ mkdir -m go-rwx dir
3040           $ cd dir
3041           $ tar -xvf /archives/got-it-off-the-net.tar.gz
3043      As a corollary, do not do an incremental restore from an untrusted
3044      archive.
3046    * Do not let untrusted users access files extracted from untrusted
3047      archives without checking first for problems such as setuid
3048      programs.
3050    * Do not let untrusted users modify directories that are ancestors of
3051      top-level arguments of `tar'.  For example, while you are
3052      executing `tar -cf /archive/u-home.tar /u/home', do not let an
3053      untrusted user modify `/', `/archive', or `/u'.
3055    * Pay attention to the diagnostics and exit status of `tar'.
3057    * When archiving live file systems, monitor running instances of
3058      `tar' to detect denial-of-service attacks.
3060    * Avoid unusual options such as `--absolute-names' (`-P'),
3061      `--dereference' (`-h'), `--overwrite', `--recursive-unlink', and
3062      `--remove-files' unless you understand their security implications.
3065 \x1f
3066 File: tar.info,  Node: Changes,  Next: Configuring Help Summary,  Prev: Reliability and security,  Up: Top
3068 Appendix A Changes
3069 ******************
3071 This appendix lists some important user-visible changes between version
3072 GNU `tar' 1.26 and previous versions. An up-to-date version of this
3073 document is available at the GNU `tar' documentation page
3074 (http://www.gnu.org/software/tar/manual/changes.html).
3076 Use of globbing patterns when listing and extracting.
3077      Previous versions of GNU tar assumed shell-style globbing when
3078      extracting from or listing an archive.  For example:
3080           $ tar xf foo.tar '*.c'
3082      would extract all files whose names end in `.c'.  This behavior
3083      was not documented and was incompatible with traditional tar
3084      implementations.  Therefore, starting from version 1.15.91, GNU tar
3085      no longer uses globbing by default.  For example, the above
3086      invocation is now interpreted as a request to extract from the
3087      archive the file named `*.c'.
3089      To facilitate transition to the new behavior for those users who
3090      got used to the previous incorrect one, `tar' will print a warning
3091      if it finds out that a requested member was not found in the
3092      archive and its name looks like a globbing pattern.  For example:
3094           $ tar xf foo.tar  '*.c'
3095           tar: Pattern matching characters used in file names. Please,
3096           tar: use --wildcards to enable pattern matching, or --no-wildcards to
3097           tar: suppress this warning.
3098           tar: *.c: Not found in archive
3099           tar: Error exit delayed from previous errors
3101      To treat member names as globbing patterns, use the `--wildcards'
3102      option.  If you want to tar to mimic the behavior of versions
3103      prior to 1.15.91, add this option to your `TAR_OPTIONS' variable.
3105      *Note wildcards::, for the detailed discussion of the use of
3106      globbing patterns by GNU `tar'.
3108 Use of short option `-o'.
3109      Earlier versions of GNU `tar' understood `-o' command line option
3110      as a synonym for `--old-archive'.
3112      GNU `tar' starting from version 1.13.90 understands this option as
3113      a synonym for `--no-same-owner'.  This is compatible with UNIX98
3114      `tar' implementations.
3116      However, to facilitate transition, `-o' option retains its old
3117      semantics when it is used with one of archive-creation commands.
3118      Users are encouraged to use `--format=oldgnu' instead.
3120      It is especially important, since versions of GNU Automake up to
3121      and including 1.8.4 invoke tar with this option to produce
3122      distribution tarballs.  *Note v7: Formats, for the detailed
3123      discussion of this issue and its implications.
3125      *Note tar-formats: (automake)Options, for a description on how to
3126      use various archive formats with `automake'.
3128      Future versions of GNU `tar' will understand `-o' only as a
3129      synonym for `--no-same-owner'.
3131 Use of short option `-l'
3132      Earlier versions of GNU `tar' understood `-l' option as a synonym
3133      for `--one-file-system'.  Since such usage contradicted to UNIX98
3134      specification and harmed compatibility with other implementations,
3135      it was declared deprecated in version 1.14.  However, to
3136      facilitate transition to its new semantics, it was supported by
3137      versions 1.15 and 1.15.90.  The present use of `-l' as a short
3138      variant of `--check-links' was introduced in version 1.15.91.
3140 Use of options `--portability' and `--old-archive'
3141      These options are deprecated.  Please use `--format=v7' instead.
3143 Use of option `--posix'
3144      This option is deprecated.  Please use `--format=posix' instead.
3146 \x1f
3147 File: tar.info,  Node: Configuring Help Summary,  Next: Fixing Snapshot Files,  Prev: Changes,  Up: Top
3149 Appendix B Configuring Help Summary
3150 ***********************************
3152 Running `tar --help' displays the short `tar' option summary (*note
3153 help::). This summary is organized by "groups" of semantically close
3154 options. The options within each group are printed in the following
3155 order: a short option, eventually followed by a list of corresponding
3156 long option names, followed by a short description of the option. For
3157 example, here is an excerpt from the actual `tar --help' output:
3159  Main operation mode:
3161   -A, --catenate, --concatenate   append tar files to an archive
3162   -c, --create               create a new archive
3163   -d, --diff, --compare      find differences between archive and
3164                              file system
3165       --delete               delete from the archive
3167    The exact visual representation of the help output is configurable
3168 via `ARGP_HELP_FMT' environment variable. The value of this variable is
3169 a comma-separated list of "format variable" assignments. There are two
3170 kinds of format variables. An "offset variable" keeps the offset of
3171 some part of help output text from the leftmost column on the screen. A
3172 "boolean" variable is a flag that toggles some output feature on or
3173 off. Depending on the type of the corresponding variable, there are two
3174 kinds of assignments:
3176 Offset assignment
3177      The assignment to an offset variable has the following syntax:
3179           VARIABLE=VALUE
3181      where VARIABLE is the variable name, and VALUE is a numeric value
3182      to be assigned to the variable.
3184 Boolean assignment
3185      To assign `true' value to a variable, simply put this variable
3186      name. To assign `false' value, prefix the variable name with
3187      `no-'. For example:
3189           # Assign `true' value:
3190           dup-args
3191           # Assign `false' value:
3192           no-dup-args
3194    Following variables are declared:
3196  -- Help Output: boolean dup-args
3197      If true, arguments for an option are shown with both short and long
3198      options, even when a given option has both forms, for example:
3200             -f ARCHIVE, --file=ARCHIVE use archive file or device ARCHIVE
3202      If false, then if an option has both short and long forms, the
3203      argument is only shown with the long one, for example:
3205             -f, --file=ARCHIVE         use archive file or device ARCHIVE
3207      and a message indicating that the argument is applicable to both
3208      forms is printed below the options. This message can be disabled
3209      using `dup-args-note' (see below).
3211      The default is false.
3213  -- Help Output: boolean dup-args-note
3214      If this variable is true, which is the default, the following
3215      notice is displayed at the end of the help output:
3217           Mandatory or optional arguments to long options are also
3218           mandatory or optional for any corresponding short options.
3220      Setting `no-dup-args-note' inhibits this message. Normally, only
3221      one of variables `dup-args' or `dup-args-note' should be set.
3223  -- Help Output: offset short-opt-col
3224      Column in which short options start. Default is 2.
3226           $ tar --help|grep ARCHIVE
3227             -f, --file=ARCHIVE   use archive file or device ARCHIVE
3228           $ ARGP_HELP_FMT=short-opt-col=6 tar --help|grep ARCHIVE
3229                 -f, --file=ARCHIVE   use archive file or device ARCHIVE
3231  -- Help Output: offset long-opt-col
3232      Column in which long options start. Default is 6. For example:
3234           $ tar --help|grep ARCHIVE
3235             -f, --file=ARCHIVE   use archive file or device ARCHIVE
3236           $ ARGP_HELP_FMT=long-opt-col=16 tar --help|grep ARCHIVE
3237             -f,           --file=ARCHIVE   use archive file or device ARCHIVE
3239  -- Help Output: offset doc-opt-col
3240      Column in which "doc options" start.  A doc option isn't actually
3241      an option, but rather an arbitrary piece of documentation that is
3242      displayed in much the same manner as the options.  For example, in
3243      the description of `--format' option:
3245             -H, --format=FORMAT        create archive of the given format.
3247            FORMAT is one of the following:
3249               gnu                      GNU tar 1.13.x format
3250               oldgnu                   GNU format as per tar <= 1.12
3251               pax                      POSIX 1003.1-2001 (pax) format
3252               posix                    same as pax
3253               ustar                    POSIX 1003.1-1988 (ustar) format
3254               v7                       old V7 tar format
3256      the format names are doc options. Thus, if you set
3257      `ARGP_HELP_FMT=doc-opt-col=6' the above part of the help output
3258      will look as follows:
3260             -H, --format=FORMAT        create archive of the given format.
3262            FORMAT is one of the following:
3264                   gnu                      GNU tar 1.13.x format
3265                   oldgnu                   GNU format as per tar <= 1.12
3266                   pax                      POSIX 1003.1-2001 (pax) format
3267                   posix                    same as pax
3268                   ustar                    POSIX 1003.1-1988 (ustar) format
3269                   v7                       old V7 tar format
3271  -- Help Output: offset opt-doc-col
3272      Column in which option description starts. Default is 29.
3274           $ tar --help|grep ARCHIVE
3275             -f, --file=ARCHIVE         use archive file or device ARCHIVE
3276           $ ARGP_HELP_FMT=opt-doc-col=19 tar --help|grep ARCHIVE
3277             -f, --file=ARCHIVE   use archive file or device ARCHIVE
3278           $ ARGP_HELP_FMT=opt-doc-col=9 tar --help|grep ARCHIVE
3279             -f, --file=ARCHIVE
3280                      use archive file or device ARCHIVE
3282      Notice, that the description starts on a separate line if
3283      `opt-doc-col' value is too small.
3285  -- Help Output: offset header-col
3286      Column in which "group headers" are printed.  A group header is a
3287      descriptive text preceding an option group.  For example, in the
3288      following text:
3290       Main operation mode:
3292        -A, --catenate, --concatenate   append tar files to
3293                                   an archive
3294        -c, --create               create a new archive
3295       `Main operation mode:' is the group header.
3297      The default value is 1.
3299  -- Help Output: offset usage-indent
3300      Indentation of wrapped usage lines. Affects `--usage' output.
3301      Default is 12.
3303  -- Help Output: offset rmargin
3304      Right margin of the text output. Used for wrapping.
3306 \x1f
3307 File: tar.info,  Node: Fixing Snapshot Files,  Next: Tar Internals,  Prev: Configuring Help Summary,  Up: Top
3309 Appendix C Fixing Snapshot Files
3310 ********************************
3312 Sometimes device numbers can change after upgrading your kernel version
3313 or reconfiguring the hardware.  Reportedly this is the case with some
3314 newer Linux kernels, when using LVM.  In majority of cases this change
3315 is unnoticed by the users.  However, it influences `tar' incremental
3316 backups: the device number is stored in tar snapshot files (*note
3317 Snapshot Files::) and is used to determine whether the file has changed
3318 since the last backup.  If the device numbers change for some reason,
3319 the next backup you run will be a full backup.
3321    To minimize the impact in these cases, GNU `tar' comes with the
3322 `tar-snapshot-edit' utility for inspecting and updating device numbers
3323 in snapshot files.  The utility, written by Dustin J. Mitchell, is
3324 available from GNU `tar' home page
3325 (http://www.gnu.org/software/tar/utils/tar-snapshot-edit.html).
3327    To obtain the device numbers used in the snapshot file, run
3329      $ tar-snapshot-edit SNAPFILE
3331 where SNAPFILE is the name of the snapshot file (you can supply as many
3332 files as you wish in a single command line).
3334    To update all occurrences of the given device number in the file, use
3335 `-r' option.  It takes a single argument of the form `OLDDEV-NEWDEV',
3336 where OLDDEV is the device number used in the snapshot file, and NEWDEV
3337 is the corresponding new device number.  Both numbers may be specified
3338 in hex (e.g., `0xfe01'), decimal (e.g., `65025'), or as a major:minor
3339 number pair (e.g., `254:1').  To change several device numbers at once,
3340 specify them in a single comma-separated list, as in `-r
3341 0x3060-0x4500,0x307-0x4600'.
3343    Before updating the snapshot file, it is a good idea to create a
3344 backup copy of it.  This is accomplished by `-b' option.  The name of
3345 the backup file is obtained by appending `~' to the original file name.
3347    An example session:
3348      $ tar-snapshot-edit /var/backup/snap.a
3349      file version 2
3350      /tmp/snap: Device 0x0306 occurs 634 times.
3351      $ tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a
3352      file version 2
3354 \x1f
3355 File: tar.info,  Node: Tar Internals,  Next: Genfile,  Prev: Fixing Snapshot Files,  Up: Top
3357 Appendix D Tar Internals
3358 ************************
3360 * Menu:
3362 * Standard::           Basic Tar Format
3363 * Extensions::         GNU Extensions to the Archive Format
3364 * Sparse Formats::     Storing Sparse Files
3365 * Snapshot Files::
3366 * Dumpdir::
3368 \x1f
3369 File: tar.info,  Node: Standard,  Next: Extensions,  Up: Tar Internals
3371 Basic Tar Format
3372 ================
3374      _(This message will disappear, once this node revised.)_
3376 While an archive may contain many files, the archive itself is a single
3377 ordinary file.  Like any other file, an archive file can be written to
3378 a storage device such as a tape or disk, sent through a pipe or over a
3379 network, saved on the active file system, or even stored in another
3380 archive.  An archive file is not easy to read or manipulate without
3381 using the `tar' utility or Tar mode in GNU Emacs.
3383    Physically, an archive consists of a series of file entries
3384 terminated by an end-of-archive entry, which consists of two 512 blocks
3385 of zero bytes.  A file entry usually describes one of the files in the
3386 archive (an "archive member"), and consists of a file header and the
3387 contents of the file.  File headers contain file names and statistics,
3388 checksum information which `tar' uses to detect file corruption, and
3389 information about file types.
3391    Archives are permitted to have more than one member with the same
3392 member name.  One way this situation can occur is if more than one
3393 version of a file has been stored in the archive.  For information
3394 about adding new versions of a file to an archive, see *note update::.
3396    In addition to entries describing archive members, an archive may
3397 contain entries which `tar' itself uses to store information.  *Note
3398 label::, for an example of such an archive entry.
3400    A `tar' archive file contains a series of blocks.  Each block
3401 contains `BLOCKSIZE' bytes.  Although this format may be thought of as
3402 being on magnetic tape, other media are often used.
3404    Each file archived is represented by a header block which describes
3405 the file, followed by zero or more blocks which give the contents of
3406 the file.  At the end of the archive file there are two 512-byte blocks
3407 filled with binary zeros as an end-of-file marker.  A reasonable system
3408 should write such end-of-file marker at the end of an archive, but must
3409 not assume that such a block exists when reading an archive.  In
3410 particular GNU `tar' always issues a warning if it does not encounter
3413    The blocks may be "blocked" for physical I/O operations.  Each
3414 record of N blocks (where N is set by the `--blocking-factor=512-SIZE'
3415 (`-b 512-SIZE') option to `tar') is written with a single `write ()'
3416 operation.  On magnetic tapes, the result of such a write is a single
3417 record.  When writing an archive, the last record of blocks should be
3418 written at the full size, with blocks after the zero block containing
3419 all zeros.  When reading an archive, a reasonable system should
3420 properly handle an archive whose last record is shorter than the rest,
3421 or which contains garbage records after a zero block.
3423    The header block is defined in C as follows.  In the GNU `tar'
3424 distribution, this is part of file `src/tar.h':
3427      /* tar Header Block, from POSIX 1003.1-1990.  */
3429      /* POSIX header.  */
3431      struct posix_header
3432      {                              /* byte offset */
3433        char name[100];               /*   0 */
3434        char mode[8];                 /* 100 */
3435        char uid[8];                  /* 108 */
3436        char gid[8];                  /* 116 */
3437        char size[12];                /* 124 */
3438        char mtime[12];               /* 136 */
3439        char chksum[8];               /* 148 */
3440        char typeflag;                /* 156 */
3441        char linkname[100];           /* 157 */
3442        char magic[6];                /* 257 */
3443        char version[2];              /* 263 */
3444        char uname[32];               /* 265 */
3445        char gname[32];               /* 297 */
3446        char devmajor[8];             /* 329 */
3447        char devminor[8];             /* 337 */
3448        char prefix[155];             /* 345 */
3449                                      /* 500 */
3450      };
3452      #define TMAGIC   "ustar"        /* ustar and a null */
3453      #define TMAGLEN  6
3454      #define TVERSION "00"           /* 00 and no null */
3455      #define TVERSLEN 2
3457      /* Values used in typeflag field.  */
3458      #define REGTYPE  '0'            /* regular file */
3459      #define AREGTYPE '\0'           /* regular file */
3460      #define LNKTYPE  '1'            /* link */
3461      #define SYMTYPE  '2'            /* reserved */
3462      #define CHRTYPE  '3'            /* character special */
3463      #define BLKTYPE  '4'            /* block special */
3464      #define DIRTYPE  '5'            /* directory */
3465      #define FIFOTYPE '6'            /* FIFO special */
3466      #define CONTTYPE '7'            /* reserved */
3468      #define XHDTYPE  'x'            /* Extended header referring to the
3469                                         next file in the archive */
3470      #define XGLTYPE  'g'            /* Global extended header */
3472      /* Bits used in the mode field, values in octal.  */
3473      #define TSUID    04000          /* set UID on execution */
3474      #define TSGID    02000          /* set GID on execution */
3475      #define TSVTX    01000          /* reserved */
3476                                      /* file permissions */
3477      #define TUREAD   00400          /* read by owner */
3478      #define TUWRITE  00200          /* write by owner */
3479      #define TUEXEC   00100          /* execute/search by owner */
3480      #define TGREAD   00040          /* read by group */
3481      #define TGWRITE  00020          /* write by group */
3482      #define TGEXEC   00010          /* execute/search by group */
3483      #define TOREAD   00004          /* read by other */
3484      #define TOWRITE  00002          /* write by other */
3485      #define TOEXEC   00001          /* execute/search by other */
3487      /* tar Header Block, GNU extensions.  */
3489      /* In GNU tar, SYMTYPE is for to symbolic links, and CONTTYPE is for
3490         contiguous files, so maybe disobeying the `reserved' comment in POSIX
3491         header description.  I suspect these were meant to be used this way, and
3492         should not have really been `reserved' in the published standards.  */
3494      /* *BEWARE* *BEWARE* *BEWARE* that the following information is still
3495         boiling, and may change.  Even if the OLDGNU format description should be
3496         accurate, the so-called GNU format is not yet fully decided.  It is
3497         surely meant to use only extensions allowed by POSIX, but the sketch
3498         below repeats some ugliness from the OLDGNU format, which should rather
3499         go away.  Sparse files should be saved in such a way that they do *not*
3500         require two passes at archive creation time.  Huge files get some POSIX
3501         fields to overflow, alternate solutions have to be sought for this.  */
3503      /* Descriptor for a single file hole.  */
3505      struct sparse
3506      {                              /* byte offset */
3507        char offset[12];              /*   0 */
3508        char numbytes[12];            /*  12 */
3509                                      /*  24 */
3510      };
3512      /* Sparse files are not supported in POSIX ustar format.  For sparse files
3513         with a POSIX header, a GNU extra header is provided which holds overall
3514         sparse information and a few sparse descriptors.  When an old GNU header
3515         replaces both the POSIX header and the GNU extra header, it holds some
3516         sparse descriptors too.  Whether POSIX or not, if more sparse descriptors
3517         are still needed, they are put into as many successive sparse headers as
3518         necessary.  The following constants tell how many sparse descriptors fit
3519         in each kind of header able to hold them.  */
3521      #define SPARSES_IN_EXTRA_HEADER  16
3522      #define SPARSES_IN_OLDGNU_HEADER 4
3523      #define SPARSES_IN_SPARSE_HEADER 21
3525      /* Extension header for sparse files, used immediately after the GNU extra
3526         header, and used only if all sparse information cannot fit into that
3527         extra header.  There might even be many such extension headers, one after
3528         the other, until all sparse information has been recorded.  */
3530      struct sparse_header
3531      {                              /* byte offset */
3532        struct sparse sp[SPARSES_IN_SPARSE_HEADER];
3533                                      /*   0 */
3534        char isextended;              /* 504 */
3535                                      /* 505 */
3536      };
3538      /* The old GNU format header conflicts with POSIX format in such a way that
3539         POSIX archives may fool old GNU tar's, and POSIX tar's might well be
3540         fooled by old GNU tar archives.  An old GNU format header uses the space
3541         used by the prefix field in a POSIX header, and cumulates information
3542         normally found in a GNU extra header.  With an old GNU tar header, we
3543         never see any POSIX header nor GNU extra header.  Supplementary sparse
3544         headers are allowed, however.  */
3546      struct oldgnu_header
3547      {                              /* byte offset */
3548        char unused_pad1[345];        /*   0 */
3549        char atime[12];               /* 345 Incr. archive: atime of the file */
3550        char ctime[12];               /* 357 Incr. archive: ctime of the file */
3551        char offset[12];              /* 369 Multivolume archive: the offset of
3552                                         the start of this volume */
3553        char longnames[4];            /* 381 Not used */
3554        char unused_pad2;             /* 385 */
3555        struct sparse sp[SPARSES_IN_OLDGNU_HEADER];
3556                                      /* 386 */
3557        char isextended;              /* 482 Sparse file: Extension sparse header
3558                                         follows */
3559        char realsize[12];            /* 483 Sparse file: Real size*/
3560                                      /* 495 */
3561      };
3563      /* OLDGNU_MAGIC uses both magic and version fields, which are contiguous.
3564         Found in an archive, it indicates an old GNU header format, which will be
3565         hopefully become obsolescent.  With OLDGNU_MAGIC, uname and gname are
3566         valid, though the header is not truly POSIX conforming.  */
3567      #define OLDGNU_MAGIC "ustar  "  /* 7 chars and a null */
3569      /* The standards committee allows only capital A through capital Z for
3570         user-defined expansion.  Other letters in use include:
3572         'A' Solaris Access Control List
3573         'E' Solaris Extended Attribute File
3574         'I' Inode only, as in 'star'
3575         'N' Obsolete GNU tar, for file names that do not fit into the main header.
3576         'X' POSIX 1003.1-2001 eXtended (VU version)  */
3578      /* This is a dir entry that contains the names of files that were in the
3579         dir at the time the dump was made.  */
3580      #define GNUTYPE_DUMPDIR 'D'
3582      /* Identifies the *next* file on the tape as having a long linkname.  */
3583      #define GNUTYPE_LONGLINK 'K'
3585      /* Identifies the *next* file on the tape as having a long name.  */
3586      #define GNUTYPE_LONGNAME 'L'
3588      /* This is the continuation of a file that began on another volume.  */
3589      #define GNUTYPE_MULTIVOL 'M'
3591      /* This is for sparse files.  */
3592      #define GNUTYPE_SPARSE 'S'
3594      /* This file is a tape/volume header.  Ignore it on extraction.  */
3595      #define GNUTYPE_VOLHDR 'V'
3597      /* Solaris extended header */
3598      #define SOLARIS_XHDTYPE 'X'
3600      /* Jo"rg Schilling star header */
3602      struct star_header
3603      {                              /* byte offset */
3604        char name[100];               /*   0 */
3605        char mode[8];                 /* 100 */
3606        char uid[8];                  /* 108 */
3607        char gid[8];                  /* 116 */
3608        char size[12];                /* 124 */
3609        char mtime[12];               /* 136 */
3610        char chksum[8];               /* 148 */
3611        char typeflag;                /* 156 */
3612        char linkname[100];           /* 157 */
3613        char magic[6];                /* 257 */
3614        char version[2];              /* 263 */
3615        char uname[32];               /* 265 */
3616        char gname[32];               /* 297 */
3617        char devmajor[8];             /* 329 */
3618        char devminor[8];             /* 337 */
3619        char prefix[131];             /* 345 */
3620        char atime[12];               /* 476 */
3621        char ctime[12];               /* 488 */
3622                                      /* 500 */
3623      };
3625      #define SPARSES_IN_STAR_HEADER      4
3626      #define SPARSES_IN_STAR_EXT_HEADER  21
3628      struct star_in_header
3629      {
3630        char fill[345];       /*   0  Everything that is before t_prefix */
3631        char prefix[1];       /* 345  t_name prefix */
3632        char fill2;           /* 346  */
3633        char fill3[8];        /* 347  */
3634        char isextended;      /* 355  */
3635        struct sparse sp[SPARSES_IN_STAR_HEADER]; /* 356  */
3636        char realsize[12];    /* 452  Actual size of the file */
3637        char offset[12];      /* 464  Offset of multivolume contents */
3638        char atime[12];       /* 476  */
3639        char ctime[12];       /* 488  */
3640        char mfill[8];        /* 500  */
3641        char xmagic[4];       /* 508  "tar" */
3642      };
3644      struct star_ext_header
3645      {
3646        struct sparse sp[SPARSES_IN_STAR_EXT_HEADER];
3647        char isextended;
3648      };
3650    All characters in header blocks are represented by using 8-bit
3651 characters in the local variant of ASCII.  Each field within the
3652 structure is contiguous; that is, there is no padding used within the
3653 structure.  Each character on the archive medium is stored contiguously.
3655    Bytes representing the contents of files (after the header block of
3656 each file) are not translated in any way and are not constrained to
3657 represent characters in any character set.  The `tar' format does not
3658 distinguish text files from binary files, and no translation of file
3659 contents is performed.
3661    The `name', `linkname', `magic', `uname', and `gname' are
3662 null-terminated character strings.  All other fields are zero-filled
3663 octal numbers in ASCII.  Each numeric field of width W contains W minus
3664 1 digits, and a null.
3666    The `name' field is the file name of the file, with directory names
3667 (if any) preceding the file name, separated by slashes.
3669    The `mode' field provides nine bits specifying file permissions and
3670 three bits to specify the Set UID, Set GID, and Save Text ("sticky")
3671 modes.  Values for these bits are defined above.  When special
3672 permissions are required to create a file with a given mode, and the
3673 user restoring files from the archive does not hold such permissions,
3674 the mode bit(s) specifying those special permissions are ignored.
3675 Modes which are not supported by the operating system restoring files
3676 from the archive will be ignored.  Unsupported modes should be faked up
3677 when creating or updating an archive; e.g., the group permission could
3678 be copied from the _other_ permission.
3680    The `uid' and `gid' fields are the numeric user and group ID of the
3681 file owners, respectively.  If the operating system does not support
3682 numeric user or group IDs, these fields should be ignored.
3684    The `size' field is the size of the file in bytes; linked files are
3685 archived with this field specified as zero.
3687    The `mtime' field is the data modification time of the file at the
3688 time it was archived.  It is the ASCII representation of the octal
3689 value of the last time the file's contents were modified, represented
3690 as an integer number of seconds since January 1, 1970, 00:00
3691 Coordinated Universal Time.
3693    The `chksum' field is the ASCII representation of the octal value of
3694 the simple sum of all bytes in the header block.  Each 8-bit byte in
3695 the header is added to an unsigned integer, initialized to zero, the
3696 precision of which shall be no less than seventeen bits.  When
3697 calculating the checksum, the `chksum' field is treated as if it were
3698 all blanks.
3700    The `typeflag' field specifies the type of file archived.  If a
3701 particular implementation does not recognize or permit the specified
3702 type, the file will be extracted as if it were a regular file.  As this
3703 action occurs, `tar' issues a warning to the standard error.
3705    The `atime' and `ctime' fields are used in making incremental
3706 backups; they store, respectively, the particular file's access and
3707 status change times.
3709    The `offset' is used by the `--multi-volume' (`-M') option, when
3710 making a multi-volume archive.  The offset is number of bytes into the
3711 file that we need to restart at to continue the file on the next tape,
3712 i.e., where we store the location that a continued file is continued at.
3714    The following fields were added to deal with sparse files.  A file
3715 is "sparse" if it takes in unallocated blocks which end up being
3716 represented as zeros, i.e., no useful data.  A test to see if a file is
3717 sparse is to look at the number blocks allocated for it versus the
3718 number of characters in the file; if there are fewer blocks allocated
3719 for the file than would normally be allocated for a file of that size,
3720 then the file is sparse.  This is the method `tar' uses to detect a
3721 sparse file, and once such a file is detected, it is treated
3722 differently from non-sparse files.
3724    Sparse files are often `dbm' files, or other database-type files
3725 which have data at some points and emptiness in the greater part of the
3726 file.  Such files can appear to be very large when an `ls -l' is done
3727 on them, when in truth, there may be a very small amount of important
3728 data contained in the file.  It is thus undesirable to have `tar' think
3729 that it must back up this entire file, as great quantities of room are
3730 wasted on empty blocks, which can lead to running out of room on a tape
3731 far earlier than is necessary.  Thus, sparse files are dealt with so
3732 that these empty blocks are not written to the tape.  Instead, what is
3733 written to the tape is a description, of sorts, of the sparse file:
3734 where the holes are, how big the holes are, and how much data is found
3735 at the end of the hole.  This way, the file takes up potentially far
3736 less room on the tape, and when the file is extracted later on, it will
3737 look exactly the way it looked beforehand.  The following is a
3738 description of the fields used to handle a sparse file:
3740    The `sp' is an array of `struct sparse'.  Each `struct sparse'
3741 contains two 12-character strings which represent an offset into the
3742 file and a number of bytes to be written at that offset.  The offset is
3743 absolute, and not relative to the offset in preceding array element.
3745    The header can hold four of these `struct sparse' at the moment; if
3746 more are needed, they are not stored in the header.
3748    The `isextended' flag is set when an `extended_header' is needed to
3749 deal with a file.  Note that this means that this flag can only be set
3750 when dealing with a sparse file, and it is only set in the event that
3751 the description of the file will not fit in the allotted room for
3752 sparse structures in the header.  In other words, an extended_header is
3753 needed.
3755    The `extended_header' structure is used for sparse files which need
3756 more sparse structures than can fit in the header.  The header can fit
3757 4 such structures; if more are needed, the flag `isextended' gets set
3758 and the next block is an `extended_header'.
3760    Each `extended_header' structure contains an array of 21 sparse
3761 structures, along with a similar `isextended' flag that the header had.
3762 There can be an indeterminate number of such `extended_header's to
3763 describe a sparse file.
3765 `REGTYPE'
3766 `AREGTYPE'
3767      These flags represent a regular file.  In order to be compatible
3768      with older versions of `tar', a `typeflag' value of `AREGTYPE'
3769      should be silently recognized as a regular file.  New archives
3770      should be created using `REGTYPE'.  Also, for backward
3771      compatibility, `tar' treats a regular file whose name ends with a
3772      slash as a directory.
3774 `LNKTYPE'
3775      This flag represents a file linked to another file, of any type,
3776      previously archived.  Such files are identified in Unix by each
3777      file having the same device and inode number.  The linked-to name
3778      is specified in the `linkname' field with a trailing null.
3780 `SYMTYPE'
3781      This represents a symbolic link to another file.  The linked-to
3782      name is specified in the `linkname' field with a trailing null.
3784 `CHRTYPE'
3785 `BLKTYPE'
3786      These represent character special files and block special files
3787      respectively.  In this case the `devmajor' and `devminor' fields
3788      will contain the major and minor device numbers respectively.
3789      Operating systems may map the device specifications to their own
3790      local specification, or may ignore the entry.
3792 `DIRTYPE'
3793      This flag specifies a directory or sub-directory.  The directory
3794      name in the `name' field should end with a slash.  On systems where
3795      disk allocation is performed on a directory basis, the `size' field
3796      will contain the maximum number of bytes (which may be rounded to
3797      the nearest disk block allocation unit) which the directory may
3798      hold.  A `size' field of zero indicates no such limiting.  Systems
3799      which do not support limiting in this manner should ignore the
3800      `size' field.
3802 `FIFOTYPE'
3803      This specifies a FIFO special file.  Note that the archiving of a
3804      FIFO file archives the existence of this file and not its contents.
3806 `CONTTYPE'
3807      This specifies a contiguous file, which is the same as a normal
3808      file except that, in operating systems which support it, all its
3809      space is allocated contiguously on the disk.  Operating systems
3810      which do not allow contiguous allocation should silently treat this
3811      type as a normal file.
3813 `A' ... `Z'
3814      These are reserved for custom implementations.  Some of these are
3815      used in the GNU modified format, as described below.
3818    Other values are reserved for specification in future revisions of
3819 the P1003 standard, and should not be used by any `tar' program.
3821    The `magic' field indicates that this archive was output in the
3822 P1003 archive format.  If this field contains `TMAGIC', the `uname' and
3823 `gname' fields will contain the ASCII representation of the owner and
3824 group of the file respectively.  If found, the user and group IDs are
3825 used rather than the values in the `uid' and `gid' fields.
3827    For references, see ISO/IEC 9945-1:1990 or IEEE Std 1003.1-1990,
3828 pages 169-173 (section 10.1) for `Archive/Interchange File Format'; and
3829 IEEE Std 1003.2-1992, pages 380-388 (section 4.48) and pages 936-940
3830 (section E.4.48) for `pax - Portable archive interchange'.
3832 \x1f
3833 File: tar.info,  Node: Extensions,  Next: Sparse Formats,  Prev: Standard,  Up: Tar Internals
3835 GNU Extensions to the Archive Format
3836 ====================================
3838      _(This message will disappear, once this node revised.)_
3840 The GNU format uses additional file types to describe new types of
3841 files in an archive.  These are listed below.
3843 `GNUTYPE_DUMPDIR'
3844 `'D''
3845      This represents a directory and a list of files created by the
3846      `--incremental' (`-G') option.  The `size' field gives the total
3847      size of the associated list of files.  Each file name is preceded
3848      by either a `Y' (the file should be in this archive) or an `N'.
3849      (The file is a directory, or is not stored in the archive.)  Each
3850      file name is terminated by a null.  There is an additional null
3851      after the last file name.
3853 `GNUTYPE_MULTIVOL'
3854 `'M''
3855      This represents a file continued from another volume of a
3856      multi-volume archive created with the `--multi-volume' (`-M')
3857      option.  The original type of the file is not given here.  The
3858      `size' field gives the maximum size of this piece of the file
3859      (assuming the volume does not end before the file is written out).
3860      The `offset' field gives the offset from the beginning of the file
3861      where this part of the file begins.  Thus `size' plus `offset'
3862      should equal the original size of the file.
3864 `GNUTYPE_SPARSE'
3865 `'S''
3866      This flag indicates that we are dealing with a sparse file.  Note
3867      that archiving a sparse file requires special operations to find
3868      holes in the file, which mark the positions of these holes, along
3869      with the number of bytes of data to be found after the hole.
3871 `GNUTYPE_VOLHDR'
3872 `'V''
3873      This file type is used to mark the volume header that was given
3874      with the `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') option when
3875      the archive was created.  The `name' field contains the `name'
3876      given after the `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL')
3877      option.  The `size' field is zero.  Only the first file in each
3878      volume of an archive should have this type.
3881    You may have trouble reading a GNU format archive on a non-GNU
3882 system if the options `--incremental' (`-G'), `--multi-volume' (`-M'),
3883 `--sparse' (`-S'), or `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') were
3884 used when writing the archive.  In general, if `tar' does not use the
3885 GNU-added fields of the header, other versions of `tar' should be able
3886 to read the archive.  Otherwise, the `tar' program will give an error,
3887 the most likely one being a checksum error.
3889 \x1f
3890 File: tar.info,  Node: Sparse Formats,  Next: Snapshot Files,  Prev: Extensions,  Up: Tar Internals
3892 Storing Sparse Files
3893 ====================
3895 The notion of sparse file, and the ways of handling it from the point
3896 of view of GNU `tar' user have been described in detail in *note
3897 sparse::.  This chapter describes the internal format GNU `tar' uses to
3898 store such files.
3900    The support for sparse files in GNU `tar' has a long history.  The
3901 earliest version featuring this support that I was able to find was
3902 1.09, released in November, 1990.  The format introduced back then is
3903 called "old GNU" sparse format and in spite of the fact that its design
3904 contained many flaws, it was the only format GNU `tar' supported until
3905 version 1.14 (May, 2004), which introduced initial support for sparse
3906 archives in PAX archives (*note posix::).  This format was not free
3907 from design flaws, either and it was subsequently improved in versions
3908 1.15.2 (November, 2005) and 1.15.92 (June, 2006).
3910    In addition to GNU sparse format, GNU `tar' is able to read and
3911 extract sparse files archived by `star'.
3913    The following subsections describe each format in detail.
3915 * Menu:
3917 * Old GNU Format::
3918 * PAX 0::                PAX Format, Versions 0.0 and 0.1
3919 * PAX 1::                PAX Format, Version 1.0
3921 \x1f
3922 File: tar.info,  Node: Old GNU Format,  Next: PAX 0,  Up: Sparse Formats
3924 D.0.1 Old GNU Format
3925 --------------------
3927 The format introduced in November 1990 (v. 1.09) was designed on top of
3928 standard `ustar' headers in such an unfortunate way that some of its
3929 fields overwrote fields required by POSIX.
3931    An old GNU sparse header is designated by type `S'
3932 (`GNUTYPE_SPARSE') and has the following layout:
3934 Offset  Size    Name           Data type      Contents
3935 ---------------------------------------------------------------------------- 
3936 0       345                    N/A            Not used.
3937 345     12      atime          Number         `atime' of the file.
3938 357     12      ctime          Number         `ctime' of the file .
3939 369     12      offset         Number         For multivolume archives:
3940                                               the offset of the start of
3941                                               this volume.
3942 381     4                      N/A            Not used.
3943 385     1                      N/A            Not used.
3944 386     96      sp             `sparse_header'(4 entries) File map.
3945 482     1       isextended     Bool           `1' if an extension sparse
3946                                               header follows, `0'
3947                                               otherwise.
3948 483     12      realsize       Number         Real size of the file.
3950    Each of `sparse_header' object at offset 386 describes a single data
3951 chunk. It has the following structure:
3953 Offset  Size    Data type      Contents
3954 --------------------------------------------------------------------------- 
3955 0       12      Number         Offset of the beginning of the chunk.
3956 12      12      Number         Size of the chunk.
3958    If the member contains more than four chunks, the `isextended' field
3959 of the header has the value `1' and the main header is followed by one
3960 or more "extension headers".  Each such header has the following
3961 structure:
3963 Offset  Size    Name           Data type      Contents
3964 ---------------------------------------------------------------------------- 
3965 0       21      sp             `sparse_header' (21 entries) File map.
3966 504     1       isextended     Bool           `1' if an extension sparse
3967                                               header follows, or `0'
3968                                               otherwise.
3970    A header with `isextended=0' ends the map.
3972 \x1f
3973 File: tar.info,  Node: PAX 0,  Next: PAX 1,  Prev: Old GNU Format,  Up: Sparse Formats
3975 D.0.2 PAX Format, Versions 0.0 and 0.1
3976 --------------------------------------
3978 There are two formats available in this branch.  The version `0.0' is
3979 the initial version of sparse format used by `tar' versions
3980 1.14-1.15.1.  The sparse file map is kept in extended (`x') PAX header
3981 variables:
3983 `GNU.sparse.size'
3984      Real size of the stored file;
3986 `GNU.sparse.numblocks'
3987      Number of blocks in the sparse map;
3989 `GNU.sparse.offset'
3990      Offset of the data block;
3992 `GNU.sparse.numbytes'
3993      Size of the data block.
3995    The latter two variables repeat for each data block, so the overall
3996 structure is like this:
3998      GNU.sparse.size=SIZE
3999      GNU.sparse.numblocks=NUMBLOCKS
4000      repeat NUMBLOCKS times
4001        GNU.sparse.offset=OFFSET
4002        GNU.sparse.numbytes=NUMBYTES
4003      end repeat
4005    This format presented the following two problems:
4007   1. Whereas the POSIX specification allows a variable to appear
4008      multiple times in a header, it requires that only the last
4009      occurrence be meaningful.  Thus, multiple occurrences of
4010      `GNU.sparse.offset' and `GNU.sparse.numbytes' are conflicting with
4011      the POSIX specs.
4013   2. Attempting to extract such archives using a third-party's `tar'
4014      results in extraction of sparse files in _condensed form_.  If the
4015      `tar' implementation in question does not support POSIX format, it
4016      will also extract a file containing extension header attributes.
4017      This file can be used to expand the file to its original state.
4018      However, posix-aware `tar's will usually ignore the unknown
4019      variables, which makes restoring the file more difficult.  *Note
4020      Extraction of sparse members in v.0.0 format: extracting sparse
4021      v.0.x, for the detailed description of how to restore such members
4022      using non-GNU `tar's.
4024    GNU `tar' 1.15.2 introduced sparse format version `0.1', which
4025 attempted to solve these problems.  As its predecessor, this format
4026 stores sparse map in the extended POSIX header.  It retains
4027 `GNU.sparse.size' and `GNU.sparse.numblocks' variables, but instead of
4028 `GNU.sparse.offset'/`GNU.sparse.numbytes' pairs it uses a single
4029 variable:
4031 `GNU.sparse.map'
4032      Map of non-null data chunks.  It is a string consisting of
4033      comma-separated values "OFFSET,SIZE[,OFFSET-1,SIZE-1...]"
4035    To address the 2nd problem, the `name' field in `ustar' is replaced
4036 with a special name, constructed using the following pattern:
4038      %d/GNUSparseFile.%p/%f
4040    The real name of the sparse file is stored in the variable
4041 `GNU.sparse.name'.  Thus, those `tar' implementations that are not
4042 aware of GNU extensions will at least extract the files into separate
4043 directories, giving the user a possibility to expand it afterwards.
4044 *Note Extraction of sparse members in v.0.1 format: extracting sparse
4045 v.0.x, for the detailed description of how to restore such members
4046 using non-GNU `tar's.
4048    The resulting `GNU.sparse.map' string can be _very_ long.  Although
4049 POSIX does not impose any limit on the length of a `x' header variable,
4050 this possibly can confuse some `tar's.
4052 \x1f
4053 File: tar.info,  Node: PAX 1,  Prev: PAX 0,  Up: Sparse Formats
4055 D.0.3 PAX Format, Version 1.0
4056 -----------------------------
4058 The version `1.0' of sparse format was introduced with GNU `tar'
4059 1.15.92.  Its main objective was to make the resulting file extractable
4060 with little effort even by non-posix aware `tar' implementations.
4061 Starting from this version, the extended header preceding a sparse
4062 member always contains the following variables that identify the format
4063 being used:
4065 `GNU.sparse.major'
4066      Major version
4068 `GNU.sparse.minor'
4069      Minor version
4071    The `name' field in `ustar' header contains a special name,
4072 constructed using the following pattern:
4074      %d/GNUSparseFile.%p/%f
4076    The real name of the sparse file is stored in the variable
4077 `GNU.sparse.name'.  The real size of the file is stored in the variable
4078 `GNU.sparse.realsize'.
4080    The sparse map itself is stored in the file data block, preceding
4081 the actual file data.  It consists of a series of octal numbers of
4082 arbitrary length, delimited by newlines. The map is padded with nulls
4083 to the nearest block boundary.
4085    The first number gives the number of entries in the map. Following
4086 are map entries, each one consisting of two numbers giving the offset
4087 and size of the data block it describes.
4089    The format is designed in such a way that non-posix aware `tar's and
4090 `tar's not supporting `GNU.sparse.*' keywords will extract each sparse
4091 file in its condensed form with the file map prepended and will place it
4092 into a separate directory.  Then, using a simple program it would be
4093 possible to expand the file to its original form even without GNU `tar'.
4094 *Note Sparse Recovery::, for the detailed information on how to extract
4095 sparse members without GNU `tar'.
4097 \x1f
4098 File: tar.info,  Node: Snapshot Files,  Next: Dumpdir,  Prev: Sparse Formats,  Up: Tar Internals
4100 Format of the Incremental Snapshot Files
4101 ========================================
4103 A "snapshot file" (or "directory file") is created during incremental
4104 backups (*note Incremental Dumps::).  It contains the status of the
4105 file system at the time of the dump and is used to determine which
4106 files were modified since the last backup.
4108    GNU `tar' version 1.26 supports three snapshot file formats.  The
4109 first format, called "format 0", is the one used by GNU `tar' versions
4110 up to 1.15.1. The second format, called "format 1" is an extended
4111 version of this format, that contains more metadata and allows for
4112 further extensions. It was used by version 1.15.1. Starting from
4113 version 1.16 and up to 1.26, the "format 2" is used.
4115    GNU `tar' is able to read all three formats, but will create
4116 snapshots only in format 2.
4118    This appendix describes all three formats in detail.
4120   0.   `Format 0' snapshot file begins with a line containing a decimal
4121      number that represents a UNIX timestamp of the beginning of the
4122      last archivation. This line is followed by directory metadata
4123      descriptions, one per line. Each description has the following
4124      format:
4126           NFSDEV INODE NAME
4128      where:
4130     NFS
4131           A single plus character (`+'), if this directory is located on
4132           an NFS-mounted partition, or a single space otherwise;
4134     DEV
4135           Device number of the directory;
4137     INODE
4138           I-node number of the directory;
4140     NAME
4141           Name of the directory. Any special characters (white-space,
4142           backslashes, etc.) are quoted.
4144   1.   `Format 1' snapshot file begins with a line specifying the
4145      format of the file. This line has the following structure:
4147           `GNU tar-'TAR-VERSION`-'INCR-FORMAT-VERSION
4149      where TAR-VERSION is the version number of GNU `tar'
4150      implementation that created this snapshot, and INCR-FORMAT-VERSION
4151      is the version number of the snapshot format (in this case `1').
4153      Next line contains two decimal numbers, representing the time of
4154      the last backup. First number is the number of seconds, the second
4155      one is the number of nanoseconds, since the beginning of the epoch.
4157      Lines that follow contain directory metadata, one line per
4158      directory. Each line is formatted as follows:
4160           [NFS]MTIME-SEC MTIME-NSEC DEV INODE NAME
4162      where MTIME-SEC and MTIME-NSEC represent last modification time of
4163      this directory with nanosecond precision; NFS, DEV, INODE and NAME
4164      have the same meaning as with `format 0'.
4166   2.   `Format 2' snapshot file begins with a format identifier, as
4167      described for version 1, e.g.:
4169           GNU tar-1.26-2
4171      This line is followed by newline. Rest of file consists of
4172      records, separated by null (ASCII 0) characters. Thus, in contrast
4173      to the previous formats, format 2 snapshot is a binary file.
4175      First two records are decimal numbers, representing the time of
4176      the last backup.  First number is the number of seconds, the
4177      second one is the number of nanoseconds, since the beginning of the
4178      epoch.  These are followed by arbitrary number of directory
4179      records.
4181      Each "directory record" contains a set of metadata describing a
4182      particular directory.  Parts of a directory record are delimited
4183      with ASCII 0 characters.  The following table describes each part.
4184      The "Number" type in this table stands for a decimal number in
4185      ASCII notation.
4187      Field         Type          Description
4188      --------------------------------------------------------------------- 
4189      nfs           Character     `1' if the directory is located on an
4190                                  NFS-mounted partition, or `0' otherwise;
4191      mtime-sec     Number        Modification time, seconds;
4192      mtime-nano    Number        Modification time, nanoseconds;
4193      dev-no        Number        Device number;
4194      i-no          Number        I-node number;
4195      name          String        Directory name; in contrast to the
4196                                  previous versions it is not quoted;
4197      contents      Dumpdir       Contents of the directory; *Note
4198                                  Dumpdir::, for a description of its
4199                                  format.
4202      Dumpdirs stored in snapshot files contain only records of types
4203      `Y', `N' and `D'.
4206 \x1f
4207 File: tar.info,  Node: Dumpdir,  Prev: Snapshot Files,  Up: Tar Internals
4209 Dumpdir
4210 =======
4212 Incremental archives keep information about contents of each dumped
4213 directory in special data blocks called "dumpdirs".
4215    Dumpdir is a sequence of entries of the following form:
4217      C FILENAME \0
4219 where C is one of the "control codes" described below, FILENAME is the
4220 name of the file C operates upon, and `\0' represents a nul character
4221 (ASCII 0).  The white space characters were added for readability, real
4222 dumpdirs do not contain them.
4224    Each dumpdir ends with a single nul character.
4226    The following table describes control codes and their meanings:
4229      FILENAME is contained in the archive.
4232      FILENAME was present in the directory at the time the archive was
4233      made, yet it was not dumped to the archive, because it had not
4234      changed since the last backup.
4237      FILENAME is a directory.
4240      This code requests renaming of the FILENAME to the name specified
4241      with the `T' command, that immediately follows it.
4244      Specify target file name for `R' command (see below).
4247      Specify "temporary directory" name for a rename operation (see
4248      below).
4250    Codes `Y', `N' and `D' require FILENAME argument to be a relative
4251 file name to the directory this dumpdir describes, whereas codes `R',
4252 `T' and `X' require their argument to be an absolute file name.
4254    The three codes `R', `T' and `X' specify a "renaming operation".  In
4255 the simplest case it is:
4257      R`source'\0T`dest'\0
4259 which means "rename file `source' to file `dest'".
4261    However, there are cases that require using a "temporary directory".
4262 For example, consider the following scenario:
4264   1. Previous run dumped a directory `foo' which contained the
4265      following three directories:
4267           a
4268           b
4269           c
4271   2. They were renamed _cyclically_, so that:
4273           `a' became `b'
4274           `b' became `c'
4275           `c' became `a'
4277   3. New incremental dump was made.
4279    This case cannot be handled by three successive renames, since
4280 renaming `a' to `b' will destroy the existing directory.  To correctly
4281 process it, GNU `tar' needs a temporary directory, so it creates the
4282 following dumpdir (newlines have been added for readability):
4284      Xfoo\0
4285      Rfoo/a\0T\0
4286      Rfoo/b\0Tfoo/c\0
4287      Rfoo/c\0Tfoo/a\0
4288      R\0Tfoo/a\0
4290    The first command, `Xfoo\0', instructs the extractor to create a
4291 temporary directory in the directory `foo'.  Second command,
4292 `Rfoo/aT\0', says "rename file `foo/a' to the temporary directory that
4293 has just been created" (empty file name after a command means use
4294 temporary directory).  Third and fourth commands work as usual, and,
4295 finally, the last command, `R\0Tfoo/a\0' tells tar to rename the
4296 temporary directory to `foo/a'.
4298    The exact placement of a dumpdir in the archive depends on the
4299 archive format (*note Formats::):
4301    * PAX archives
4303      In PAX archives, dumpdir is stored in the extended header of the
4304      corresponding directory, in variable `GNU.dumpdir'.
4306    * GNU and old GNU archives
4308      These formats implement special header type `D', which is similar
4309      to ustar header `5' (directory), except that it precedes a data
4310      block containing the dumpdir.
4312 \x1f
4313 File: tar.info,  Node: Genfile,  Next: Free Software Needs Free Documentation,  Prev: Tar Internals,  Up: Top
4315 Appendix E Genfile
4316 ******************
4318 This appendix describes `genfile', an auxiliary program used in the GNU
4319 tar testsuite. If you are not interested in developing GNU tar, skip
4320 this appendix.
4322    Initially, `genfile' was used to generate data files for the
4323 testsuite, hence its name. However, new operation modes were being
4324 implemented as the testsuite grew more sophisticated, and now `genfile'
4325 is a multi-purpose instrument.
4327    There are three basic operation modes:
4329 File Generation
4330      This is the default mode. In this mode, `genfile' generates data
4331      files.
4333 File Status
4334      In this mode `genfile' displays status of specified files.
4336 Synchronous Execution.
4337      In this mode `genfile' executes the given program with
4338      `--checkpoint' option and executes a set of actions when specified
4339      checkpoints are reached.
4341 * Menu:
4343 * Generate Mode::     File Generation Mode.
4344 * Status Mode::       File Status Mode.
4345 * Exec Mode::         Synchronous Execution mode.
4347 \x1f
4348 File: tar.info,  Node: Generate Mode,  Next: Status Mode,  Up: Genfile
4350 E.1 Generate Mode
4351 =================
4353 In this mode `genfile' creates a data file for the test suite. The size
4354 of the file is given with the `--length' (`-l') option. By default the
4355 file contents is written to the standard output, this can be changed
4356 using `--file' (`-f') command line option. Thus, the following two
4357 commands are equivalent:
4359      genfile --length 100 > outfile
4360      genfile --length 100 --file outfile
4362    If `--length' is not given, `genfile' will generate an empty
4363 (zero-length) file.
4365    The command line option `--seek=N' istructs `genfile' to skip the
4366 given number of bytes (N) in the output file before writing to it.  It
4367 is similar to the `seek=N' of the `dd' utility.
4369    You can instruct `genfile' to create several files at one go, by
4370 giving it `--files-from' (`-T') option followed by a name of file
4371 containing a list of file names. Using dash (`-') instead of the file
4372 name causes `genfile' to read file list from the standard input. For
4373 example:
4375      # Read file names from file `file.list'
4376      genfile --files-from file.list
4377      # Read file names from standard input
4378      genfile --files-from -
4380    The list file is supposed to contain one file name per line. To use
4381 file lists separated by ASCII NUL character, use `--null' (`-0')
4382 command line option:
4384      genfile --null --files-from file.list
4386    The default data pattern for filling the generated file consists of
4387 first 256 letters of ASCII code, repeated enough times to fill the
4388 entire file. This behavior can be changed with `--pattern' option. This
4389 option takes a mandatory argument, specifying pattern name to use.
4390 Currently two patterns are implemented:
4392 `--pattern=default'
4393      The default pattern as described above.
4395 `--pattern=zero'
4396      Fills the file with zeroes.
4398    If no file name was given, the program exits with the code `0'.
4399 Otherwise, it exits with `0' only if it was able to create a file of
4400 the specified length.
4402    Special option `--sparse' (`-s') instructs `genfile' to create a
4403 sparse file. Sparse files consist of "data fragments", separated by
4404 "holes" or blocks of zeros. On many operating systems, actual disk
4405 storage is not allocated for holes, but they are counted in the length
4406 of the file. To create a sparse file, `genfile' should know where to
4407 put data fragments, and what data to use to fill them. So, when
4408 `--sparse' is given the rest of the command line specifies a so-called
4409 "file map".
4411    The file map consists of any number of "fragment descriptors". Each
4412 descriptor is composed of two values: a number, specifying fragment
4413 offset from the end of the previous fragment or, for the very first
4414 fragment, from the beginning of the file, and "contents string", i.e.,
4415 a string of characters, specifying the pattern to fill the fragment
4416 with. File offset can be suffixed with the following quantifiers:
4420      The number is expressed in kilobytes.
4424      The number is expressed in megabytes.
4428      The number is expressed in gigabytes.
4430    For each letter in contents string `genfile' will generate a "block"
4431 of data, filled with this letter and will write it to the fragment. The
4432 size of block is given by `--block-size' option. It defaults to 512.
4433 Thus, if the string consists of N characters, the resulting file
4434 fragment will contain `N*BLOCK-SIZE' of data.
4436    Last fragment descriptor can have only file offset part. In this
4437 case `genfile' will create a hole at the end of the file up to the
4438 given offset.
4440    For example, consider the following invocation:
4442      genfile --sparse --file sparsefile 0 ABCD 1M EFGHI 2000K
4444 It will create 3101184-bytes long file of the following structure:
4446 Offset                    Length         Contents
4447 0                         4*512=2048     Four 512-byte blocks, filled
4448                                          with letters `A', `B', `C' and
4449                                          `D'.
4450 2048                      1046528        Zero bytes
4451 1050624                   5*512=2560     Five blocks, filled with letters
4452                                          `E', `F', `G', `H', `I'.
4453 1053184                   2048000        Zero bytes
4455    The exit code of `genfile --status' command is `0' only if created
4456 file is actually sparse.
4458 \x1f
4459 File: tar.info,  Node: Status Mode,  Next: Exec Mode,  Prev: Generate Mode,  Up: Genfile
4461 E.2 Status Mode
4462 ===============
4464 In status mode, `genfile' prints file system status for each file
4465 specified in the command line. This mode is toggled by `--stat' (`-S')
4466 command line option. An optional argument to this option specifies
4467 output "format": a comma-separated list of `struct stat' fields to be
4468 displayed. This list can contain following identifiers :
4470 name
4471      The file name.
4474 st_dev
4475      Device number in decimal.
4478 st_ino
4479      Inode number.
4481 mode[.NUMBER]
4482 st_mode[.NUMBER]
4483      File mode in octal.  Optional NUMBER specifies octal mask to be
4484      applied to the mode before outputting.  For example, `--stat
4485      mode.777' will preserve lower nine bits of it.  Notice, that you
4486      can use any punctuation character in place of `.'.
4488 nlink
4489 st_nlink
4490      Number of hard links.
4493 st_uid
4494      User ID of owner.
4497 st_gid
4498      Group ID of owner.
4500 size
4501 st_size
4502      File size in decimal.
4504 blksize
4505 st_blksize
4506      The size in bytes of each file block.
4508 blocks
4509 st_blocks
4510      Number of blocks allocated.
4512 atime
4513 st_atime
4514      Time of last access.
4516 mtime
4517 st_mtime
4518      Time of last modification
4520 ctime
4521 st_ctime
4522      Time of last status change
4524 sparse
4525      A boolean value indicating whether the file is `sparse'.
4527    Modification times are displayed in UTC as UNIX timestamps, unless
4528 suffixed with `H' (for "human-readable"), as in `ctimeH', in which case
4529 usual `tar tv' output format is used.
4531    The default output format is: `name,dev,ino,mode,
4532 nlink,uid,gid,size,blksize,blocks,atime,mtime,ctime'.
4534    For example, the following command will display file names and
4535 corresponding times of last access for each file in the current working
4536 directory:
4538      genfile --stat=name,atime *
4540 \x1f
4541 File: tar.info,  Node: Exec Mode,  Prev: Status Mode,  Up: Genfile
4543 E.3 Exec Mode
4544 =============
4546 This mode is designed for testing the behavior of `paxutils' commands
4547 when some of the files change during archiving. It is an experimental
4548 mode.
4550    The `Exec Mode' is toggled by `--run' command line option (or its
4551 alias `-r'). The non-optional arguments to `getopt' give the command
4552 line to be executed. Normally, it should contain at least the
4553 `--checkpoint' option.
4555    A set of options is provided for defining checkpoint values and
4556 actions to be executed upon reaching them. Checkpoint values are
4557 introduced with the `--checkpoint' command line option. Argument to
4558 this option is the number of checkpoint in decimal.
4560    Any number of "actions" may be specified after a checkpoint.
4561 Available actions are
4563 `--cut FILE'
4564 `--truncate FILE'
4565      Truncate FILE to the size specified by previous `--length' option
4566      (or 0, if it is not given).
4568 `--append FILE'
4569      Append data to FILE. The size of data and its pattern are given by
4570      previous `--length' and `pattern' options.
4572 `--touch FILE'
4573      Update the access and modification times of FILE. These timestamps
4574      are changed to the current time, unless `--date' option was given,
4575      in which case they are changed to the specified time. Argument to
4576      `--date' option is a date specification in an almost arbitrary
4577      format (*note Date input formats::).
4579 `--exec COMMAND'
4580      Execute given shell command.
4582 `--unlink FILE'
4583      Unlink the FILE.
4585    Option `--verbose' instructs `genfile' to print on standard output
4586 notifications about checkpoints being executed and to verbosely
4587 describe exit status of the command.
4589    While the command is being executed its standard output remains
4590 connected to descriptor 1. All messages it prints to file descriptor 2,
4591 except checkpoint notifications, are forwarded to standard error.
4593    `Genfile' exits with the exit status of the executed command.
4595    For compatibility with previous `genfile' versions, the `--run'
4596 option takes an optional argument. If used this way, its argument
4597 supplies the command line to be executed. There should be no
4598 non-optional arguments in the `genfile' command line.
4600    The actual command line is constructed by inserting the
4601 `--checkpoint' option between the command name and its first argument
4602 (if any). Due to this, the argument to `--run' may not use traditional
4603 `tar' option syntax, i.e., the following is wrong:
4605      # Wrong!
4606      genfile --run='tar cf foo bar'
4608 Use the following syntax instead:
4610      genfile --run='tar -cf foo bar' ACTIONS...
4612    The above command line is equivalent to
4614      genfile ACTIONS... -- tar -cf foo bar
4616    Notice, that the use of compatibility mode is deprecated.
4618 \x1f
4619 File: tar.info,  Node: Free Software Needs Free Documentation,  Next: GNU Free Documentation License,  Prev: Genfile,  Up: Top
4621 Appendix F Free Software Needs Free Documentation
4622 *************************************************
4624 The biggest deficiency in the free software community today is not in
4625 the software--it is the lack of good free documentation that we can
4626 include with the free software.  Many of our most important programs do
4627 not come with free reference manuals and free introductory texts.
4628 Documentation is an essential part of any software package; when an
4629 important free software package does not come with a free manual and a
4630 free tutorial, that is a major gap.  We have many such gaps today.
4632    Consider Perl, for instance.  The tutorial manuals that people
4633 normally use are non-free.  How did this come about?  Because the
4634 authors of those manuals published them with restrictive terms--no
4635 copying, no modification, source files not available--which exclude
4636 them from the free software world.
4638    That wasn't the first time this sort of thing happened, and it was
4639 far from the last.  Many times we have heard a GNU user eagerly
4640 describe a manual that he is writing, his intended contribution to the
4641 community, only to learn that he had ruined everything by signing a
4642 publication contract to make it non-free.
4644    Free documentation, like free software, is a matter of freedom, not
4645 price.  The problem with the non-free manual is not that publishers
4646 charge a price for printed copies--that in itself is fine.  (The Free
4647 Software Foundation sells printed copies of manuals, too.)  The problem
4648 is the restrictions on the use of the manual.  Free manuals are
4649 available in source code form, and give you permission to copy and
4650 modify.  Non-free manuals do not allow this.
4652    The criteria of freedom for a free manual are roughly the same as for
4653 free software.  Redistribution (including the normal kinds of
4654 commercial redistribution) must be permitted, so that the manual can
4655 accompany every copy of the program, both on-line and on paper.
4657    Permission for modification of the technical content is crucial too.
4658 When people modify the software, adding or changing features, if they
4659 are conscientious they will change the manual too--so they can provide
4660 accurate and clear documentation for the modified program.  A manual
4661 that leaves you no choice but to write a new manual to document a
4662 changed version of the program is not really available to our community.
4664    Some kinds of limits on the way modification is handled are
4665 acceptable.  For example, requirements to preserve the original
4666 author's copyright notice, the distribution terms, or the list of
4667 authors, are ok.  It is also no problem to require modified versions to
4668 include notice that they were modified.  Even entire sections that may
4669 not be deleted or changed are acceptable, as long as they deal with
4670 nontechnical topics (like this one).  These kinds of restrictions are
4671 acceptable because they don't obstruct the community's normal use of
4672 the manual.
4674    However, it must be possible to modify all the _technical_ content
4675 of the manual, and then distribute the result in all the usual media,
4676 through all the usual channels.  Otherwise, the restrictions obstruct
4677 the use of the manual, it is not free, and we need another manual to
4678 replace it.
4680    Please spread the word about this issue.  Our community continues to
4681 lose manuals to proprietary publishing.  If we spread the word that
4682 free software needs free reference manuals and free tutorials, perhaps
4683 the next person who wants to contribute by writing documentation will
4684 realize, before it is too late, that only free manuals contribute to
4685 the free software community.
4687    If you are writing documentation, please insist on publishing it
4688 under the GNU Free Documentation License or another free documentation
4689 license.  Remember that this decision requires your approval--you don't
4690 have to let the publisher decide.  Some commercial publishers will use
4691 a free license if you insist, but they will not propose the option; it
4692 is up to you to raise the issue and say firmly that this is what you
4693 want.  If the publisher you are dealing with refuses, please try other
4694 publishers.  If you're not sure whether a proposed license is free,
4695 write to <licensing@gnu.org>.
4697    You can encourage commercial publishers to sell more free, copylefted
4698 manuals and tutorials by buying them, and particularly by buying copies
4699 from the publishers that paid for their writing or for major
4700 improvements.  Meanwhile, try to avoid buying non-free documentation at
4701 all.  Check the distribution terms of a manual before you buy it, and
4702 insist that whoever seeks your business must respect your freedom.
4703 Check the history of the book, and try reward the publishers that have
4704 paid or pay the authors to work on it.
4706    The Free Software Foundation maintains a list of free documentation
4707 published by other publishers, at
4708 `http://www.fsf.org/doc/other-free-books.html'.
4710 \x1f
4711 File: tar.info,  Node: GNU Free Documentation License,  Next: Index of Command Line Options,  Prev: Free Software Needs Free Documentation,  Up: Top
4713 Appendix G GNU Free Documentation License
4714 *****************************************
4716                      Version 1.3, 3 November 2008
4718      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
4719      `http://fsf.org/'
4721      Everyone is permitted to copy and distribute verbatim copies
4722      of this license document, but changing it is not allowed.
4724   0. PREAMBLE
4726      The purpose of this License is to make a manual, textbook, or other
4727      functional and useful document "free" in the sense of freedom: to
4728      assure everyone the effective freedom to copy and redistribute it,
4729      with or without modifying it, either commercially or
4730      noncommercially.  Secondarily, this License preserves for the
4731      author and publisher a way to get credit for their work, while not
4732      being considered responsible for modifications made by others.
4734      This License is a kind of "copyleft", which means that derivative
4735      works of the document must themselves be free in the same sense.
4736      It complements the GNU General Public License, which is a copyleft
4737      license designed for free software.
4739      We have designed this License in order to use it for manuals for
4740      free software, because free software needs free documentation: a
4741      free program should come with manuals providing the same freedoms
4742      that the software does.  But this License is not limited to
4743      software manuals; it can be used for any textual work, regardless
4744      of subject matter or whether it is published as a printed book.
4745      We recommend this License principally for works whose purpose is
4746      instruction or reference.
4748   1. APPLICABILITY AND DEFINITIONS
4750      This License applies to any manual or other work, in any medium,
4751      that contains a notice placed by the copyright holder saying it
4752      can be distributed under the terms of this License.  Such a notice
4753      grants a world-wide, royalty-free license, unlimited in duration,
4754      to use that work under the conditions stated herein.  The
4755      "Document", below, refers to any such manual or work.  Any member
4756      of the public is a licensee, and is addressed as "you".  You
4757      accept the license if you copy, modify or distribute the work in a
4758      way requiring permission under copyright law.
4760      A "Modified Version" of the Document means any work containing the
4761      Document or a portion of it, either copied verbatim, or with
4762      modifications and/or translated into another language.
4764      A "Secondary Section" is a named appendix or a front-matter section
4765      of the Document that deals exclusively with the relationship of the
4766      publishers or authors of the Document to the Document's overall
4767      subject (or to related matters) and contains nothing that could
4768      fall directly within that overall subject.  (Thus, if the Document
4769      is in part a textbook of mathematics, a Secondary Section may not
4770      explain any mathematics.)  The relationship could be a matter of
4771      historical connection with the subject or with related matters, or
4772      of legal, commercial, philosophical, ethical or political position
4773      regarding them.
4775      The "Invariant Sections" are certain Secondary Sections whose
4776      titles are designated, as being those of Invariant Sections, in
4777      the notice that says that the Document is released under this
4778      License.  If a section does not fit the above definition of
4779      Secondary then it is not allowed to be designated as Invariant.
4780      The Document may contain zero Invariant Sections.  If the Document
4781      does not identify any Invariant Sections then there are none.
4783      The "Cover Texts" are certain short passages of text that are
4784      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
4785      that says that the Document is released under this License.  A
4786      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
4787      be at most 25 words.
4789      A "Transparent" copy of the Document means a machine-readable copy,
4790      represented in a format whose specification is available to the
4791      general public, that is suitable for revising the document
4792      straightforwardly with generic text editors or (for images
4793      composed of pixels) generic paint programs or (for drawings) some
4794      widely available drawing editor, and that is suitable for input to
4795      text formatters or for automatic translation to a variety of
4796      formats suitable for input to text formatters.  A copy made in an
4797      otherwise Transparent file format whose markup, or absence of
4798      markup, has been arranged to thwart or discourage subsequent
4799      modification by readers is not Transparent.  An image format is
4800      not Transparent if used for any substantial amount of text.  A
4801      copy that is not "Transparent" is called "Opaque".
4803      Examples of suitable formats for Transparent copies include plain
4804      ASCII without markup, Texinfo input format, LaTeX input format,
4805      SGML or XML using a publicly available DTD, and
4806      standard-conforming simple HTML, PostScript or PDF designed for
4807      human modification.  Examples of transparent image formats include
4808      PNG, XCF and JPG.  Opaque formats include proprietary formats that
4809      can be read and edited only by proprietary word processors, SGML or
4810      XML for which the DTD and/or processing tools are not generally
4811      available, and the machine-generated HTML, PostScript or PDF
4812      produced by some word processors for output purposes only.
4814      The "Title Page" means, for a printed book, the title page itself,
4815      plus such following pages as are needed to hold, legibly, the
4816      material this License requires to appear in the title page.  For
4817      works in formats which do not have any title page as such, "Title
4818      Page" means the text near the most prominent appearance of the
4819      work's title, preceding the beginning of the body of the text.
4821      The "publisher" means any person or entity that distributes copies
4822      of the Document to the public.
4824      A section "Entitled XYZ" means a named subunit of the Document
4825      whose title either is precisely XYZ or contains XYZ in parentheses
4826      following text that translates XYZ in another language.  (Here XYZ
4827      stands for a specific section name mentioned below, such as
4828      "Acknowledgements", "Dedications", "Endorsements", or "History".)
4829      To "Preserve the Title" of such a section when you modify the
4830      Document means that it remains a section "Entitled XYZ" according
4831      to this definition.
4833      The Document may include Warranty Disclaimers next to the notice
4834      which states that this License applies to the Document.  These
4835      Warranty Disclaimers are considered to be included by reference in
4836      this License, but only as regards disclaiming warranties: any other
4837      implication that these Warranty Disclaimers may have is void and
4838      has no effect on the meaning of this License.
4840   2. VERBATIM COPYING
4842      You may copy and distribute the Document in any medium, either
4843      commercially or noncommercially, provided that this License, the
4844      copyright notices, and the license notice saying this License
4845      applies to the Document are reproduced in all copies, and that you
4846      add no other conditions whatsoever to those of this License.  You
4847      may not use technical measures to obstruct or control the reading
4848      or further copying of the copies you make or distribute.  However,
4849      you may accept compensation in exchange for copies.  If you
4850      distribute a large enough number of copies you must also follow
4851      the conditions in section 3.
4853      You may also lend copies, under the same conditions stated above,
4854      and you may publicly display copies.
4856   3. COPYING IN QUANTITY
4858      If you publish printed copies (or copies in media that commonly
4859      have printed covers) of the Document, numbering more than 100, and
4860      the Document's license notice requires Cover Texts, you must
4861      enclose the copies in covers that carry, clearly and legibly, all
4862      these Cover Texts: Front-Cover Texts on the front cover, and
4863      Back-Cover Texts on the back cover.  Both covers must also clearly
4864      and legibly identify you as the publisher of these copies.  The
4865      front cover must present the full title with all words of the
4866      title equally prominent and visible.  You may add other material
4867      on the covers in addition.  Copying with changes limited to the
4868      covers, as long as they preserve the title of the Document and
4869      satisfy these conditions, can be treated as verbatim copying in
4870      other respects.
4872      If the required texts for either cover are too voluminous to fit
4873      legibly, you should put the first ones listed (as many as fit
4874      reasonably) on the actual cover, and continue the rest onto
4875      adjacent pages.
4877      If you publish or distribute Opaque copies of the Document
4878      numbering more than 100, you must either include a
4879      machine-readable Transparent copy along with each Opaque copy, or
4880      state in or with each Opaque copy a computer-network location from
4881      which the general network-using public has access to download
4882      using public-standard network protocols a complete Transparent
4883      copy of the Document, free of added material.  If you use the
4884      latter option, you must take reasonably prudent steps, when you
4885      begin distribution of Opaque copies in quantity, to ensure that
4886      this Transparent copy will remain thus accessible at the stated
4887      location until at least one year after the last time you
4888      distribute an Opaque copy (directly or through your agents or
4889      retailers) of that edition to the public.
4891      It is requested, but not required, that you contact the authors of
4892      the Document well before redistributing any large number of
4893      copies, to give them a chance to provide you with an updated
4894      version of the Document.
4896   4. MODIFICATIONS
4898      You may copy and distribute a Modified Version of the Document
4899      under the conditions of sections 2 and 3 above, provided that you
4900      release the Modified Version under precisely this License, with
4901      the Modified Version filling the role of the Document, thus
4902      licensing distribution and modification of the Modified Version to
4903      whoever possesses a copy of it.  In addition, you must do these
4904      things in the Modified Version:
4906        A. Use in the Title Page (and on the covers, if any) a title
4907           distinct from that of the Document, and from those of
4908           previous versions (which should, if there were any, be listed
4909           in the History section of the Document).  You may use the
4910           same title as a previous version if the original publisher of
4911           that version gives permission.
4913        B. List on the Title Page, as authors, one or more persons or
4914           entities responsible for authorship of the modifications in
4915           the Modified Version, together with at least five of the
4916           principal authors of the Document (all of its principal
4917           authors, if it has fewer than five), unless they release you
4918           from this requirement.
4920        C. State on the Title page the name of the publisher of the
4921           Modified Version, as the publisher.
4923        D. Preserve all the copyright notices of the Document.
4925        E. Add an appropriate copyright notice for your modifications
4926           adjacent to the other copyright notices.
4928        F. Include, immediately after the copyright notices, a license
4929           notice giving the public permission to use the Modified
4930           Version under the terms of this License, in the form shown in
4931           the Addendum below.
4933        G. Preserve in that license notice the full lists of Invariant
4934           Sections and required Cover Texts given in the Document's
4935           license notice.
4937        H. Include an unaltered copy of this License.
4939        I. Preserve the section Entitled "History", Preserve its Title,
4940           and add to it an item stating at least the title, year, new
4941           authors, and publisher of the Modified Version as given on
4942           the Title Page.  If there is no section Entitled "History" in
4943           the Document, create one stating the title, year, authors,
4944           and publisher of the Document as given on its Title Page,
4945           then add an item describing the Modified Version as stated in
4946           the previous sentence.
4948        J. Preserve the network location, if any, given in the Document
4949           for public access to a Transparent copy of the Document, and
4950           likewise the network locations given in the Document for
4951           previous versions it was based on.  These may be placed in
4952           the "History" section.  You may omit a network location for a
4953           work that was published at least four years before the
4954           Document itself, or if the original publisher of the version
4955           it refers to gives permission.
4957        K. For any section Entitled "Acknowledgements" or "Dedications",
4958           Preserve the Title of the section, and preserve in the
4959           section all the substance and tone of each of the contributor
4960           acknowledgements and/or dedications given therein.
4962        L. Preserve all the Invariant Sections of the Document,
4963           unaltered in their text and in their titles.  Section numbers
4964           or the equivalent are not considered part of the section
4965           titles.
4967        M. Delete any section Entitled "Endorsements".  Such a section
4968           may not be included in the Modified Version.
4970        N. Do not retitle any existing section to be Entitled
4971           "Endorsements" or to conflict in title with any Invariant
4972           Section.
4974        O. Preserve any Warranty Disclaimers.
4976      If the Modified Version includes new front-matter sections or
4977      appendices that qualify as Secondary Sections and contain no
4978      material copied from the Document, you may at your option
4979      designate some or all of these sections as invariant.  To do this,
4980      add their titles to the list of Invariant Sections in the Modified
4981      Version's license notice.  These titles must be distinct from any
4982      other section titles.
4984      You may add a section Entitled "Endorsements", provided it contains
4985      nothing but endorsements of your Modified Version by various
4986      parties--for example, statements of peer review or that the text
4987      has been approved by an organization as the authoritative
4988      definition of a standard.
4990      You may add a passage of up to five words as a Front-Cover Text,
4991      and a passage of up to 25 words as a Back-Cover Text, to the end
4992      of the list of Cover Texts in the Modified Version.  Only one
4993      passage of Front-Cover Text and one of Back-Cover Text may be
4994      added by (or through arrangements made by) any one entity.  If the
4995      Document already includes a cover text for the same cover,
4996      previously added by you or by arrangement made by the same entity
4997      you are acting on behalf of, you may not add another; but you may
4998      replace the old one, on explicit permission from the previous
4999      publisher that added the old one.
5001      The author(s) and publisher(s) of the Document do not by this
5002      License give permission to use their names for publicity for or to
5003      assert or imply endorsement of any Modified Version.
5005   5. COMBINING DOCUMENTS
5007      You may combine the Document with other documents released under
5008      this License, under the terms defined in section 4 above for
5009      modified versions, provided that you include in the combination
5010      all of the Invariant Sections of all of the original documents,
5011      unmodified, and list them all as Invariant Sections of your
5012      combined work in its license notice, and that you preserve all
5013      their Warranty Disclaimers.
5015      The combined work need only contain one copy of this License, and
5016      multiple identical Invariant Sections may be replaced with a single
5017      copy.  If there are multiple Invariant Sections with the same name
5018      but different contents, make the title of each such section unique
5019      by adding at the end of it, in parentheses, the name of the
5020      original author or publisher of that section if known, or else a
5021      unique number.  Make the same adjustment to the section titles in
5022      the list of Invariant Sections in the license notice of the
5023      combined work.
5025      In the combination, you must combine any sections Entitled
5026      "History" in the various original documents, forming one section
5027      Entitled "History"; likewise combine any sections Entitled
5028      "Acknowledgements", and any sections Entitled "Dedications".  You
5029      must delete all sections Entitled "Endorsements."
5031   6. COLLECTIONS OF DOCUMENTS
5033      You may make a collection consisting of the Document and other
5034      documents released under this License, and replace the individual
5035      copies of this License in the various documents with a single copy
5036      that is included in the collection, provided that you follow the
5037      rules of this License for verbatim copying of each of the
5038      documents in all other respects.
5040      You may extract a single document from such a collection, and
5041      distribute it individually under this License, provided you insert
5042      a copy of this License into the extracted document, and follow
5043      this License in all other respects regarding verbatim copying of
5044      that document.
5046   7. AGGREGATION WITH INDEPENDENT WORKS
5048      A compilation of the Document or its derivatives with other
5049      separate and independent documents or works, in or on a volume of
5050      a storage or distribution medium, is called an "aggregate" if the
5051      copyright resulting from the compilation is not used to limit the
5052      legal rights of the compilation's users beyond what the individual
5053      works permit.  When the Document is included in an aggregate, this
5054      License does not apply to the other works in the aggregate which
5055      are not themselves derivative works of the Document.
5057      If the Cover Text requirement of section 3 is applicable to these
5058      copies of the Document, then if the Document is less than one half
5059      of the entire aggregate, the Document's Cover Texts may be placed
5060      on covers that bracket the Document within the aggregate, or the
5061      electronic equivalent of covers if the Document is in electronic
5062      form.  Otherwise they must appear on printed covers that bracket
5063      the whole aggregate.
5065   8. TRANSLATION
5067      Translation is considered a kind of modification, so you may
5068      distribute translations of the Document under the terms of section
5069      4.  Replacing Invariant Sections with translations requires special
5070      permission from their copyright holders, but you may include
5071      translations of some or all Invariant Sections in addition to the
5072      original versions of these Invariant Sections.  You may include a
5073      translation of this License, and all the license notices in the
5074      Document, and any Warranty Disclaimers, provided that you also
5075      include the original English version of this License and the
5076      original versions of those notices and disclaimers.  In case of a
5077      disagreement between the translation and the original version of
5078      this License or a notice or disclaimer, the original version will
5079      prevail.
5081      If a section in the Document is Entitled "Acknowledgements",
5082      "Dedications", or "History", the requirement (section 4) to
5083      Preserve its Title (section 1) will typically require changing the
5084      actual title.
5086   9. TERMINATION
5088      You may not copy, modify, sublicense, or distribute the Document
5089      except as expressly provided under this License.  Any attempt
5090      otherwise to copy, modify, sublicense, or distribute it is void,
5091      and will automatically terminate your rights under this License.
5093      However, if you cease all violation of this License, then your
5094      license from a particular copyright holder is reinstated (a)
5095      provisionally, unless and until the copyright holder explicitly
5096      and finally terminates your license, and (b) permanently, if the
5097      copyright holder fails to notify you of the violation by some
5098      reasonable means prior to 60 days after the cessation.
5100      Moreover, your license from a particular copyright holder is
5101      reinstated permanently if the copyright holder notifies you of the
5102      violation by some reasonable means, this is the first time you have
5103      received notice of violation of this License (for any work) from
5104      that copyright holder, and you cure the violation prior to 30 days
5105      after your receipt of the notice.
5107      Termination of your rights under this section does not terminate
5108      the licenses of parties who have received copies or rights from
5109      you under this License.  If your rights have been terminated and
5110      not permanently reinstated, receipt of a copy of some or all of
5111      the same material does not give you any rights to use it.
5113  10. FUTURE REVISIONS OF THIS LICENSE
5115      The Free Software Foundation may publish new, revised versions of
5116      the GNU Free Documentation License from time to time.  Such new
5117      versions will be similar in spirit to the present version, but may
5118      differ in detail to address new problems or concerns.  See
5119      `http://www.gnu.org/copyleft/'.
5121      Each version of the License is given a distinguishing version
5122      number.  If the Document specifies that a particular numbered
5123      version of this License "or any later version" applies to it, you
5124      have the option of following the terms and conditions either of
5125      that specified version or of any later version that has been
5126      published (not as a draft) by the Free Software Foundation.  If
5127      the Document does not specify a version number of this License,
5128      you may choose any version ever published (not as a draft) by the
5129      Free Software Foundation.  If the Document specifies that a proxy
5130      can decide which future versions of this License can be used, that
5131      proxy's public statement of acceptance of a version permanently
5132      authorizes you to choose that version for the Document.
5134  11. RELICENSING
5136      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
5137      World Wide Web server that publishes copyrightable works and also
5138      provides prominent facilities for anybody to edit those works.  A
5139      public wiki that anybody can edit is an example of such a server.
5140      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
5141      site means any set of copyrightable works thus published on the MMC
5142      site.
5144      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
5145      license published by Creative Commons Corporation, a not-for-profit
5146      corporation with a principal place of business in San Francisco,
5147      California, as well as future copyleft versions of that license
5148      published by that same organization.
5150      "Incorporate" means to publish or republish a Document, in whole or
5151      in part, as part of another Document.
5153      An MMC is "eligible for relicensing" if it is licensed under this
5154      License, and if all works that were first published under this
5155      License somewhere other than this MMC, and subsequently
5156      incorporated in whole or in part into the MMC, (1) had no cover
5157      texts or invariant sections, and (2) were thus incorporated prior
5158      to November 1, 2008.
5160      The operator of an MMC Site may republish an MMC contained in the
5161      site under CC-BY-SA on the same site at any time before August 1,
5162      2009, provided the MMC is eligible for relicensing.
5165 ADDENDUM: How to use this License for your documents
5166 ====================================================
5168 To use this License in a document you have written, include a copy of
5169 the License in the document and put the following copyright and license
5170 notices just after the title page:
5172        Copyright (C)  YEAR  YOUR NAME.
5173        Permission is granted to copy, distribute and/or modify this document
5174        under the terms of the GNU Free Documentation License, Version 1.3
5175        or any later version published by the Free Software Foundation;
5176        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
5177        Texts.  A copy of the license is included in the section entitled ``GNU
5178        Free Documentation License''.
5180    If you have Invariant Sections, Front-Cover Texts and Back-Cover
5181 Texts, replace the "with...Texts." line with this:
5183          with the Invariant Sections being LIST THEIR TITLES, with
5184          the Front-Cover Texts being LIST, and with the Back-Cover Texts
5185          being LIST.
5187    If you have Invariant Sections without Cover Texts, or some other
5188 combination of the three, merge those two alternatives to suit the
5189 situation.
5191    If your document contains nontrivial examples of program code, we
5192 recommend releasing these examples in parallel under your choice of
5193 free software license, such as the GNU General Public License, to
5194 permit their use in free software.
5196 \x1f
5197 File: tar.info,  Node: Index of Command Line Options,  Next: Index,  Prev: GNU Free Documentation License,  Up: Top
5199 Appendix H Index of Command Line Options
5200 ****************************************
5202 This appendix contains an index of all GNU `tar' long command line
5203 options. The options are listed without the preceding double-dash.  For
5204 a cross-reference of short command line options, see *note Short Option
5205 Summary::.
5207 \0\b[index\0\b]
5208 * Menu:
5210 * absolute-names:                        absolute.            (line  10)
5211 * absolute-names, summary:               Option Summary.      (line   6)
5212 * add-file:                              files.               (line  84)
5213 * after-date:                            after.               (line  24)
5214 * after-date, summary:                   Option Summary.      (line  12)
5215 * anchored:                              controlling pattern-matching.
5216                                                               (line  79)
5217 * anchored, summary:                     Option Summary.      (line  15)
5218 * append <1>:                            appending files.     (line   6)
5219 * append:                                append.              (line   6)
5220 * append, summary:                       Operation Summary.   (line   6)
5221 * atime-preserve:                        Attributes.          (line  10)
5222 * atime-preserve, summary:               Option Summary.      (line  19)
5223 * auto-compress:                         gzip.                (line 156)
5224 * auto-compress, summary:                Option Summary.      (line  65)
5225 * backup:                                backup.              (line  41)
5226 * backup, summary:                       Option Summary.      (line  71)
5227 * block-number:                          verbose.             (line 115)
5228 * block-number, summary:                 Option Summary.      (line  76)
5229 * blocking-factor:                       Blocking Factor.     (line   8)
5230 * blocking-factor, summary:              Option Summary.      (line  82)
5231 * bzip2, summary:                        Option Summary.      (line  87)
5232 * catenate:                              concatenate.         (line   6)
5233 * catenate, summary:                     Operation Summary.   (line  10)
5234 * check-device, described:               Incremental Dumps.   (line 108)
5235 * check-device, summary:                 Option Summary.      (line  92)
5236 * check-links, described:                hard links.          (line  31)
5237 * check-links, summary:                  Option Summary.      (line 143)
5238 * checkpoint:                            checkpoints.         (line   6)
5239 * checkpoint, defined:                   checkpoints.         (line  13)
5240 * checkpoint, summary:                   Option Summary.      (line  97)
5241 * checkpoint-action:                     checkpoints.         (line   6)
5242 * checkpoint-action, defined:            checkpoints.         (line  22)
5243 * checkpoint-action, summary:            Option Summary.      (line 105)
5244 * compare:                               compare.             (line   6)
5245 * compare, summary:                      Operation Summary.   (line  14)
5246 * compress:                              gzip.                (line 113)
5247 * compress, summary:                     Option Summary.      (line 152)
5248 * concatenate:                           concatenate.         (line   6)
5249 * concatenate, summary:                  Operation Summary.   (line  20)
5250 * confirmation, summary:                 Option Summary.      (line 159)
5251 * create, additional options:            create options.      (line   6)
5252 * create, complementary notes:           Basic tar.           (line  11)
5253 * create, introduced:                    Creating the archive.
5254                                                               (line   6)
5255 * create, summary:                       Operation Summary.   (line  25)
5256 * create, using with --verbose:          create verbose.      (line   6)
5257 * create, using with --verify:           verify.              (line  24)
5258 * delay-directory-restore:               Directory Modification Times and Permissions.
5259                                                               (line  62)
5260 * delay-directory-restore, summary:      Option Summary.      (line 162)
5261 * delete:                                delete.              (line   6)
5262 * delete, summary:                       Operation Summary.   (line  29)
5263 * delete, using before -append:          append.              (line  47)
5264 * dereference:                           dereference.         (line   6)
5265 * dereference, summary:                  Option Summary.      (line 167)
5266 * diff, summary:                         Operation Summary.   (line  33)
5267 * directory:                             directory.           (line  11)
5268 * directory, summary:                    Option Summary.      (line 173)
5269 * directory, using in --files-from argument: files.           (line  60)
5270 * exclude:                               exclude.             (line   6)
5271 * exclude, potential problems with:      problems with exclude.
5272                                                               (line   6)
5273 * exclude, summary:                      Option Summary.      (line 180)
5274 * exclude-backups:                       exclude.             (line  82)
5275 * exclude-backups, summary:              Option Summary.      (line 184)
5276 * exclude-caches:                        exclude.             (line 105)
5277 * exclude-caches, summary:               Option Summary.      (line 192)
5278 * exclude-caches-all:                    exclude.             (line 113)
5279 * exclude-caches-all, summary:           Option Summary.      (line 205)
5280 * exclude-caches-under:                  exclude.             (line 109)
5281 * exclude-caches-under, summary:         Option Summary.      (line 199)
5282 * exclude-from:                          exclude.             (line   6)
5283 * exclude-from, summary:                 Option Summary.      (line 187)
5284 * exclude-tag:                           exclude.             (line 122)
5285 * exclude-tag, summary:                  Option Summary.      (line 209)
5286 * exclude-tag-all:                       exclude.             (line 130)
5287 * exclude-tag-all, summary:              Option Summary.      (line 219)
5288 * exclude-tag-under:                     exclude.             (line 126)
5289 * exclude-tag-under, summary:            Option Summary.      (line 214)
5290 * exclude-vcs:                           exclude.             (line  37)
5291 * exclude-vcs, summary:                  Option Summary.      (line 223)
5292 * extract:                               extract.             (line   6)
5293 * extract, additional options:           extract options.     (line   6)
5294 * extract, complementary notes:          Basic tar.           (line  48)
5295 * extract, summary:                      Operation Summary.   (line  37)
5296 * extract, using with --listed-incremental: Incremental Dumps.
5297                                                               (line 121)
5298 * file:                                  file.                (line   6)
5299 * file, short description:               file.                (line  15)
5300 * file, summary:                         Option Summary.      (line 229)
5301 * file, tutorial:                        file tutorial.       (line   6)
5302 * files-from:                            files.               (line  14)
5303 * files-from, summary:                   Option Summary.      (line 235)
5304 * force-local, short description:        Device.              (line  70)
5305 * force-local, summary:                  Option Summary.      (line 241)
5306 * format, summary:                       Option Summary.      (line 246)
5307 * full-time, summary:                    Option Summary.      (line 271)
5308 * get, summary:                          Operation Summary.   (line  42)
5309 * group:                                 override.            (line  75)
5310 * group, summary:                        Option Summary.      (line 289)
5311 * gunzip, summary:                       Option Summary.      (line 297)
5312 * gzip:                                  gzip.                (line  91)
5313 * gzip, summary:                         Option Summary.      (line 297)
5314 * hard-dereference, described:           hard links.          (line  59)
5315 * hard-dereference, summary:             Option Summary.      (line 305)
5316 * help:                                  help tutorial.       (line   6)
5317 * help, introduction:                    help.                (line  27)
5318 * help, summary:                         Option Summary.      (line 311)
5319 * ignore-case:                           controlling pattern-matching.
5320                                                               (line  86)
5321 * ignore-case, summary:                  Option Summary.      (line 316)
5322 * ignore-command-error:                  Writing to an External Program.
5323                                                               (line  98)
5324 * ignore-command-error, summary:         Option Summary.      (line 320)
5325 * ignore-failed-read:                    Ignore Failed Read.  (line   7)
5326 * ignore-failed-read, summary:           Option Summary.      (line 324)
5327 * ignore-zeros:                          Ignore Zeros.        (line   6)
5328 * ignore-zeros, short description:       Blocking Factor.     (line 156)
5329 * ignore-zeros, summary:                 Option Summary.      (line 328)
5330 * incremental, summary:                  Option Summary.      (line 333)
5331 * incremental, using with --list:        Incremental Dumps.   (line 186)
5332 * index-file, summary:                   Option Summary.      (line 340)
5333 * info-script:                           Multi-Volume Archives.
5334                                                               (line  88)
5335 * info-script, short description:        Device.              (line 122)
5336 * info-script, summary:                  Option Summary.      (line 343)
5337 * interactive:                           interactive.         (line  14)
5338 * interactive, summary:                  Option Summary.      (line 351)
5339 * keep-newer-files:                      Keep Newer Files.    (line   6)
5340 * keep-newer-files, summary:             Option Summary.      (line 358)
5341 * keep-old-files:                        Keep Old Files.      (line   6)
5342 * keep-old-files, introduced:            Dealing with Old Files.
5343                                                               (line  16)
5344 * keep-old-files, summary:               Option Summary.      (line 362)
5345 * label <1>:                             label.               (line   6)
5346 * label:                                 Tape Files.          (line   6)
5347 * label, summary:                        Option Summary.      (line 367)
5348 * level, described:                      Incremental Dumps.   (line  76)
5349 * level, summary:                        Option Summary.      (line 374)
5350 * list:                                  list.                (line   6)
5351 * list, summary:                         Operation Summary.   (line  46)
5352 * list, using with --incremental:        Incremental Dumps.   (line 186)
5353 * list, using with --listed-incremental: Incremental Dumps.   (line 186)
5354 * list, using with --verbose:            list.                (line  30)
5355 * list, using with file name arguments:  list.                (line  68)
5356 * listed-incremental, described:         Incremental Dumps.   (line  14)
5357 * listed-incremental, summary:           Option Summary.      (line 384)
5358 * listed-incremental, using with --extract: Incremental Dumps.
5359                                                               (line 121)
5360 * listed-incremental, using with --list: Incremental Dumps.   (line 186)
5361 * lzip:                                  gzip.                (line 104)
5362 * lzip, summary:                         Option Summary.      (line 392)
5363 * lzma:                                  gzip.                (line 107)
5364 * lzma, summary:                         Option Summary.      (line 396)
5365 * lzop:                                  gzip.                (line 110)
5366 * mode:                                  override.            (line  14)
5367 * mode, summary:                         Option Summary.      (line 404)
5368 * mtime:                                 override.            (line  29)
5369 * mtime, summary:                        Option Summary.      (line 410)
5370 * multi-volume:                          Multi-Volume Archives.
5371                                                               (line   6)
5372 * multi-volume, short description:       Device.              (line  88)
5373 * multi-volume, summary:                 Option Summary.      (line 419)
5374 * new-volume-script:                     Multi-Volume Archives.
5375                                                               (line  88)
5376 * new-volume-script, short description:  Device.              (line 122)
5377 * new-volume-script, summary:            Option Summary.      (line 343)
5378 * newer:                                 after.               (line  24)
5379 * newer, summary:                        Option Summary.      (line 427)
5380 * newer-mtime:                           after.               (line  35)
5381 * newer-mtime, summary:                  Option Summary.      (line 435)
5382 * no-anchored:                           controlling pattern-matching.
5383                                                               (line  79)
5384 * no-anchored, summary:                  Option Summary.      (line 440)
5385 * no-auto-compress, summary:             Option Summary.      (line 444)
5386 * no-check-device, described:            Incremental Dumps.   (line 104)
5387 * no-check-device, summary:              Option Summary.      (line 448)
5388 * no-delay-directory-restore:            Directory Modification Times and Permissions.
5389                                                               (line  68)
5390 * no-delay-directory-restore, summary:   Option Summary.      (line 453)
5391 * no-ignore-case:                        controlling pattern-matching.
5392                                                               (line  86)
5393 * no-ignore-case, summary:               Option Summary.      (line 459)
5394 * no-ignore-command-error:               Writing to an External Program.
5395                                                               (line 103)
5396 * no-ignore-command-error, summary:      Option Summary.      (line 462)
5397 * no-null, described:                    nul.                 (line  15)
5398 * no-null, summary:                      Option Summary.      (line 466)
5399 * no-overwrite-dir, summary:             Option Summary.      (line 471)
5400 * no-quote-chars, summary:               Option Summary.      (line 475)
5401 * no-recursion:                          recurse.             (line  11)
5402 * no-recursion, summary:                 Option Summary.      (line 480)
5403 * no-same-owner:                         Attributes.          (line  63)
5404 * no-same-owner, summary:                Option Summary.      (line 484)
5405 * no-same-permissions, summary:          Option Summary.      (line 490)
5406 * no-seek, summary:                      Option Summary.      (line 495)
5407 * no-unquote:                            Selecting Archive Members.
5408                                                               (line  42)
5409 * no-unquote, summary:                   Option Summary.      (line 500)
5410 * no-wildcards:                          controlling pattern-matching.
5411                                                               (line  41)
5412 * no-wildcards, summary:                 Option Summary.      (line 504)
5413 * no-wildcards-match-slash:              controlling pattern-matching.
5414                                                               (line  92)
5415 * no-wildcards-match-slash, summary:     Option Summary.      (line 507)
5416 * null, described:                       nul.                 (line  11)
5417 * null, summary:                         Option Summary.      (line 510)
5418 * numeric-owner:                         Attributes.          (line  69)
5419 * numeric-owner, summary:                Option Summary.      (line 516)
5420 * occurrence, described:                 append.              (line  34)
5421 * occurrence, summary:                   Option Summary.      (line 533)
5422 * old-archive, summary:                  Option Summary.      (line 547)
5423 * one-file-system:                       one.                 (line  14)
5424 * one-file-system, summary:              Option Summary.      (line 550)
5425 * overwrite:                             Overwrite Old Files. (line   6)
5426 * overwrite, introduced:                 Dealing with Old Files.
5427                                                               (line  22)
5428 * overwrite, summary:                    Option Summary.      (line 555)
5429 * overwrite-dir:                         Overwrite Old Files. (line  28)
5430 * overwrite-dir, introduced:             Dealing with Old Files.
5431                                                               (line   6)
5432 * overwrite-dir, summary:                Option Summary.      (line 559)
5433 * owner:                                 override.            (line  57)
5434 * owner, summary:                        Option Summary.      (line 563)
5435 * pax-option:                            PAX keywords.        (line   6)
5436 * pax-option, summary:                   Option Summary.      (line 572)
5437 * portability, summary:                  Option Summary.      (line 578)
5438 * posix, summary:                        Option Summary.      (line 582)
5439 * preserve:                              Attributes.          (line 122)
5440 * preserve, summary:                     Option Summary.      (line 585)
5441 * preserve-order:                        Same Order.          (line   6)
5442 * preserve-order, summary:               Option Summary.      (line 589)
5443 * preserve-permissions:                  Setting Access Permissions.
5444                                                               (line  10)
5445 * preserve-permissions, short description: Attributes.        (line 109)
5446 * preserve-permissions, summary:         Option Summary.      (line 592)
5447 * quote-chars, summary:                  Option Summary.      (line 602)
5448 * quoting-style:                         quoting styles.      (line  38)
5449 * quoting-style, summary:                Option Summary.      (line 606)
5450 * read-full-records <1>:                 read full records.   (line   6)
5451 * read-full-records:                     Reading.             (line   6)
5452 * read-full-records, short description:  Blocking Factor.     (line 172)
5453 * read-full-records, summary:            Option Summary.      (line 613)
5454 * record-size, summary:                  Option Summary.      (line 618)
5455 * recursion:                             recurse.             (line  22)
5456 * recursion, summary:                    Option Summary.      (line 625)
5457 * recursive-unlink:                      Recursive Unlink.    (line   6)
5458 * recursive-unlink, summary:             Option Summary.      (line 629)
5459 * remove-files:                          remove files.        (line   6)
5460 * remove-files, summary:                 Option Summary.      (line 634)
5461 * restrict, summary:                     Option Summary.      (line 638)
5462 * rmt-command, summary:                  Option Summary.      (line 643)
5463 * rsh-command:                           Device.              (line  73)
5464 * rsh-command, summary:                  Option Summary.      (line 647)
5465 * same-order:                            Same Order.          (line   6)
5466 * same-order, summary:                   Option Summary.      (line 651)
5467 * same-owner:                            Attributes.          (line  44)
5468 * same-owner, summary:                   Option Summary.      (line 659)
5469 * same-permissions:                      Setting Access Permissions.
5470                                                               (line  10)
5471 * same-permissions, short description:   Attributes.          (line 109)
5472 * same-permissions, summary:             Option Summary.      (line 592)
5473 * seek, summary:                         Option Summary.      (line 668)
5474 * show-defaults:                         defaults.            (line   6)
5475 * show-defaults, summary:                Option Summary.      (line 677)
5476 * show-omitted-dirs:                     verbose.             (line 107)
5477 * show-omitted-dirs, summary:            Option Summary.      (line 689)
5478 * show-stored-names:                     list.                (line  60)
5479 * show-stored-names, summary:            Option Summary.      (line 693)
5480 * show-transformed-names:                transform.           (line  45)
5481 * show-transformed-names, summary:       Option Summary.      (line 693)
5482 * sparse:                                sparse.              (line  22)
5483 * sparse, summary:                       Option Summary.      (line 701)
5484 * sparse-version:                        sparse.              (line  57)
5485 * sparse-version, summary:               Option Summary.      (line 706)
5486 * starting-file:                         Starting File.       (line   6)
5487 * starting-file, summary:                Option Summary.      (line 711)
5488 * strip-components:                      transform.           (line  25)
5489 * strip-components, summary:             Option Summary.      (line 717)
5490 * suffix:                                backup.              (line  68)
5491 * suffix, summary:                       Option Summary.      (line 726)
5492 * tape-length:                           Multi-Volume Archives.
5493                                                               (line  33)
5494 * tape-length, short description:        Device.              (line  96)
5495 * tape-length, summary:                  Option Summary.      (line 730)
5496 * test-label:                            label.               (line  35)
5497 * test-label, summary:                   Option Summary.      (line 739)
5498 * to-command:                            Writing to an External Program.
5499                                                               (line   9)
5500 * to-command, summary:                   Option Summary.      (line 743)
5501 * to-stdout:                             Writing to Standard Output.
5502                                                               (line  14)
5503 * to-stdout, summary:                    Option Summary.      (line 747)
5504 * totals:                                verbose.             (line  46)
5505 * totals, summary:                       Option Summary.      (line 752)
5506 * touch <1>:                             Attributes.          (line  33)
5507 * touch:                                 Data Modification Times.
5508                                                               (line  15)
5509 * touch, summary:                        Option Summary.      (line 757)
5510 * transform:                             transform.           (line  74)
5511 * transform, summary:                    Option Summary.      (line 763)
5512 * uncompress:                            gzip.                (line 113)
5513 * uncompress, summary:                   Option Summary.      (line 152)
5514 * ungzip:                                gzip.                (line  91)
5515 * ungzip, summary:                       Option Summary.      (line 297)
5516 * unlink-first:                          Unlink First.        (line   6)
5517 * unlink-first, introduced:              Dealing with Old Files.
5518                                                               (line  42)
5519 * unlink-first, summary:                 Option Summary.      (line 783)
5520 * unquote:                               Selecting Archive Members.
5521                                                               (line  39)
5522 * unquote, summary:                      Option Summary.      (line 789)
5523 * update <1>:                            how to update.       (line   6)
5524 * update:                                update.              (line   6)
5525 * update, summary:                       Operation Summary.   (line  50)
5526 * usage:                                 help.                (line  54)
5527 * use-compress-program:                  gzip.                (line 178)
5528 * use-compress-program, summary:         Option Summary.      (line 793)
5529 * utc, summary:                          Option Summary.      (line 798)
5530 * verbose:                               verbose.             (line  18)
5531 * verbose, introduced:                   verbose tutorial.    (line   6)
5532 * verbose, summary:                      Option Summary.      (line 802)
5533 * verbose, using with --create:          create verbose.      (line   6)
5534 * verbose, using with --list:            list.                (line  30)
5535 * verify, short description:             verify.              (line   8)
5536 * verify, summary:                       Option Summary.      (line 809)
5537 * verify, using with --create:           verify.              (line  24)
5538 * version:                               help.                (line   6)
5539 * version, summary:                      Option Summary.      (line 814)
5540 * volno-file:                            Multi-Volume Archives.
5541                                                               (line  79)
5542 * volno-file, summary:                   Option Summary.      (line 819)
5543 * warning, explained:                    warnings.            (line  12)
5544 * warning, summary:                      Option Summary.      (line 824)
5545 * wildcards:                             controlling pattern-matching.
5546                                                               (line  38)
5547 * wildcards, summary:                    Option Summary.      (line 829)
5548 * wildcards-match-slash:                 controlling pattern-matching.
5549                                                               (line  92)
5550 * wildcards-match-slash, summary:        Option Summary.      (line 833)
5551 * xform:                                 transform.           (line  74)
5552 * xform, summary:                        Option Summary.      (line 763)
5553 * xz:                                    gzip.                (line  96)
5554 * xz, summary:                           Option Summary.      (line 836)
5556 \x1f
5557 File: tar.info,  Node: Index,  Prev: Index of Command Line Options,  Up: Top
5559 Appendix I Index
5560 ****************
5562 \0\b[index\0\b]
5563 * Menu:
5565 * %s: Directory has been renamed from %s, warning message: warnings.
5566                                                               (line 108)
5567 * %s: Directory has been renamed, warning message: warnings.  (line 108)
5568 * %s: Directory is new, warning message: warnings.            (line 110)
5569 * %s: directory is on a different device: not purging, warning message: warnings.
5570                                                               (line 113)
5571 * -after-date and -update compared:      after.               (line  19)
5572 * -newer-mtime and -update compared:     after.               (line  19)
5573 * A lone zero block at, warning message: warnings.            (line  35)
5574 * abbreviations for months:              Calendar date items. (line  38)
5575 * absolute file names <1>:               Remote Tape Server.  (line  17)
5576 * absolute file names:                   absolute.            (line   6)
5577 * Adding archives to an archive:         concatenate.         (line   6)
5578 * Adding files to an Archive:            appending files.     (line   6)
5579 * ADMINISTRATOR:                         General-Purpose Variables.
5580                                                               (line   7)
5581 * Age, excluding files by:               after.               (line   6)
5582 * ago in date strings:                   Relative items in date strings.
5583                                                               (line  23)
5584 * all:                                   warnings.            (line  28)
5585 * alone-zero-block:                      warnings.            (line  35)
5586 * alternative decompression programs:    gzip.                (line  54)
5587 * am in date strings:                    Time of day items.   (line  22)
5588 * Appending files to an Archive:         appending files.     (line   6)
5589 * appending files to existing archive:   append.              (line   6)
5590 * Arch, excluding files:                 exclude.             (line  37)
5591 * archive:                               Definitions.         (line   6)
5592 * Archive creation:                      file.                (line  34)
5593 * archive member:                        Definitions.         (line  15)
5594 * Archive Name:                          file.                (line   6)
5595 * Archive, creation of:                  create.              (line   8)
5596 * Archives, Appending files to:          appending files.     (line   6)
5597 * archives, binary equivalent:           PAX keywords.        (line 132)
5598 * Archiving Directories:                 create dir.          (line   6)
5599 * archiving files:                       Top.                 (line  24)
5600 * ARGP_HELP_FMT, environment variable:   Configuring Help Summary.
5601                                                               (line  21)
5602 * arguments to long options:             Long Options.        (line  31)
5603 * arguments to old options:              Old Options.         (line  17)
5604 * arguments to short options:            Short Options.       (line  13)
5605 * atrributes, files:                     Attributes.          (line   6)
5606 * Attempting extraction of symbolic links as hard links, warning message: warnings.
5607                                                               (line  77)
5608 * authors of parse_datetime:             Authors of parse_datetime.
5609                                                               (line   6)
5610 * Avoiding recursion in directories:     recurse.             (line   6)
5611 * backup options:                        backup.              (line   6)
5612 * backup suffix:                         backup.              (line  68)
5613 * BACKUP_DIRS:                           General-Purpose Variables.
5614                                                               (line  29)
5615 * BACKUP_FILES:                          General-Purpose Variables.
5616                                                               (line  55)
5617 * BACKUP_HOUR:                           General-Purpose Variables.
5618                                                               (line  11)
5619 * backups <1>:                           Backups.             (line   6)
5620 * backups:                               backup.              (line  41)
5621 * bad-dumpdir:                           warnings.            (line 116)
5622 * basic operations:                      Operations.          (line   6)
5623 * Bazaar, excluding files:               exclude.             (line  37)
5624 * beginning of time, for POSIX:          Seconds since the Epoch.
5625                                                               (line  13)
5626 * bell, checkpoint action:               checkpoints.         (line  65)
5627 * Bellovin, Steven M.:                   Authors of parse_datetime.
5628                                                               (line   6)
5629 * Berets, Jim:                           Authors of parse_datetime.
5630                                                               (line   6)
5631 * Berry, K.:                             Authors of parse_datetime.
5632                                                               (line  19)
5633 * binary equivalent archives, creating:  PAX keywords.        (line 132)
5634 * block:                                 Blocking.            (line   6)
5635 * Block number where error occurred:     verbose.             (line 115)
5636 * BLOCKING:                              General-Purpose Variables.
5637                                                               (line  25)
5638 * blocking factor:                       Blocking Factor.     (line 194)
5639 * Blocking Factor:                       Blocking Factor.     (line   6)
5640 * Blocks per record:                     Blocking Factor.     (line   6)
5641 * bug reports:                           Reports.             (line   6)
5642 * Bytes per record:                      Blocking Factor.     (line   6)
5643 * bzip2:                                 gzip.                (line   6)
5644 * cachedir:                              warnings.            (line  43)
5645 * calendar date item:                    Calendar date items. (line   6)
5646 * case, ignored in dates:                General date syntax. (line  64)
5647 * cat vs concatenate:                    concatenate.         (line  63)
5648 * Changing directory mid-stream:         directory.           (line   6)
5649 * Character class, excluding characters from: wildcards.      (line  34)
5650 * checkpoints, defined:                  checkpoints.         (line   6)
5651 * Choosing an archive file:              file.                (line   6)
5652 * comments, in dates:                    General date syntax. (line  64)
5653 * compress:                              gzip.                (line   6)
5654 * Compressed archives:                   gzip.                (line   6)
5655 * concatenate vs cat:                    concatenate.         (line  63)
5656 * Concatenating Archives:                concatenate.         (line   6)
5657 * contains a cache directory tag, warning message: warnings.  (line  43)
5658 * contiguous-cast:                       warnings.            (line  74)
5659 * corrupted archives <1>:                gzip.                (line 146)
5660 * corrupted archives:                    Full Dumps.          (line   8)
5661 * Creation of the archive:               create.              (line   8)
5662 * Current %s is newer or same age, warning message: warnings. (line  83)
5663 * CVS, excluding files:                  exclude.             (line  37)
5664 * Darcs, excluding files:                exclude.             (line  37)
5665 * DAT blocking:                          Blocking Factor.     (line 204)
5666 * Data Modification time, excluding files by: after.          (line   6)
5667 * Data modification times of extracted files: Data Modification Times.
5668                                                               (line   6)
5669 * date format, ISO 8601:                 Calendar date items. (line  30)
5670 * date input formats:                    Date input formats.  (line   6)
5671 * day in date strings:                   Relative items in date strings.
5672                                                               (line  15)
5673 * day of week item:                      Day of week items.   (line   6)
5674 * decompress-program:                    warnings.            (line  89)
5675 * Deleting files from an archive:        delete.              (line   6)
5676 * Deleting from tape archives:           delete.              (line  17)
5677 * dereferencing hard links:              hard links.          (line   6)
5678 * Descending directories, avoiding:      recurse.             (line   6)
5679 * Device numbers, changing:              Fixing Snapshot Files.
5680                                                               (line   6)
5681 * Device numbers, using in incremental backups: Incremental Dumps.
5682                                                               (line  90)
5683 * Directories, Archiving:                create dir.          (line   6)
5684 * Directories, avoiding recursion:       recurse.             (line   6)
5685 * Directory, changing mid-stream:        directory.           (line   6)
5686 * DIRLIST:                               General-Purpose Variables.
5687                                                               (line  51)
5688 * displacement of dates:                 Relative items in date strings.
5689                                                               (line   6)
5690 * doc-opt-col:                           Configuring Help Summary.
5691                                                               (line  94)
5692 * door ignored, warning message:         warnings.            (line  50)
5693 * dot, checkpoint action:                checkpoints.         (line  80)
5694 * Double-checking a write operation:     verify.              (line   6)
5695 * DUMP_BEGIN:                            User Hooks.          (line  32)
5696 * DUMP_END:                              User Hooks.          (line  36)
5697 * DUMP_REMIND_SCRIPT:                    General-Purpose Variables.
5698                                                               (line 102)
5699 * dumps, full:                           Full Dumps.          (line   8)
5700 * dup-args:                              Configuring Help Summary.
5701                                                               (line  51)
5702 * dup-args-note:                         Configuring Help Summary.
5703                                                               (line  68)
5704 * echo, checkpoint action:               checkpoints.         (line  25)
5705 * Eggert, Paul:                          Authors of parse_datetime.
5706                                                               (line   6)
5707 * End-of-archive blocks, ignoring:       Ignore Zeros.        (line   6)
5708 * End-of-archive info script:            Multi-Volume Archives.
5709                                                               (line  88)
5710 * entry:                                 Naming tar Archives. (line  11)
5711 * epoch, for POSIX:                      Seconds since the Epoch.
5712                                                               (line  13)
5713 * Error message, block number of:        verbose.             (line 125)
5714 * Exabyte blocking:                      Blocking Factor.     (line 204)
5715 * exclude:                               exclude.             (line  12)
5716 * exclude-caches:                        exclude.             (line  93)
5717 * exclude-from:                          exclude.             (line  25)
5718 * exclude-tag:                           exclude.             (line 116)
5719 * Excluding characters from a character class: wildcards.     (line  34)
5720 * Excluding file by age:                 after.               (line   6)
5721 * Excluding files by file system:        exclude.             (line   6)
5722 * Excluding files by name and pattern:   exclude.             (line   6)
5723 * Exec Mode, genfile:                    Exec Mode.           (line   6)
5724 * exec, checkpoint action:               checkpoints.         (line  96)
5725 * existing backup method:                backup.              (line  59)
5726 * exit status:                           Synopsis.            (line  67)
5727 * Extracting contiguous files as regular files, warning message: warnings.
5728                                                               (line  74)
5729 * extracting Nth copy of the file:       append.              (line  34)
5730 * Extraction:                            extract.             (line   6)
5731 * extraction:                            Definitions.         (line  22)
5732 * file archival:                         Top.                 (line  24)
5733 * file attributes:                       Attributes.          (line   6)
5734 * file changed as we read it, warning message: warnings.      (line  64)
5735 * file is on a different filesystem, warning message: warnings.
5736                                                               (line  47)
5737 * file is the archive; not dumped, warning message: warnings. (line  58)
5738 * file is unchanged; not dumped, warning message: warnings.   (line  55)
5739 * File lists separated by NUL characters: Generate Mode.      (line  33)
5740 * file name:                             Definitions.         (line  15)
5741 * File Name arguments, alternatives:     files.               (line   6)
5742 * File name arguments, using --list with: list.               (line  68)
5743 * file name read contains nul character, warning message: warnings.
5744                                                               (line  32)
5745 * file names, absolute:                  absolute.            (line   6)
5746 * File names, excluding files by:        exclude.             (line   6)
5747 * File names, terminated by NUL:         nul.                 (line   6)
5748 * File names, using hard links:          hard links.          (line   6)
5749 * File names, using symbolic links:      dereference.         (line   6)
5750 * File removed before we read it, warning message: warnings.  (line  61)
5751 * File shrank by %s bytes, warning message: warnings.         (line  44)
5752 * File system boundaries, not crossing:  one.                 (line   6)
5753 * file-changed:                          warnings.            (line  64)
5754 * file-ignored:                          warnings.            (line  50)
5755 * file-removed:                          warnings.            (line  61)
5756 * file-shrank:                           warnings.            (line  44)
5757 * file-unchanged:                        warnings.            (line  55)
5758 * FILELIST:                              General-Purpose Variables.
5759                                                               (line  65)
5760 * filename-with-nuls:                    warnings.            (line  32)
5761 * find, using with tar <1>:              recurse.             (line  11)
5762 * find, using with tar:                  files.               (line   6)
5763 * first in date strings:                 General date syntax. (line  26)
5764 * format 0, snapshot file:               Snapshot Files.      (line  23)
5765 * format 1, snapshot file:               Snapshot Files.      (line  47)
5766 * format 2, snapshot file:               Snapshot Files.      (line  69)
5767 * Format Options:                        Format Variations.   (line   6)
5768 * Format Parameters:                     Format Variations.   (line   6)
5769 * Format, old style:                     old.                 (line   6)
5770 * fortnight in date strings:             Relative items in date strings.
5771                                                               (line  15)
5772 * free documentation:                    Free Software Needs Free Documentation.
5773                                                               (line   6)
5774 * full dumps:                            Full Dumps.          (line   8)
5775 * future time stamps:                    Large or Negative Values.
5776                                                               (line   6)
5777 * general date syntax:                   General date syntax. (line   6)
5778 * Generate Mode, genfile:                Generate Mode.       (line   6)
5779 * genfile:                               Genfile.             (line   6)
5780 * genfile, create file:                  Generate Mode.       (line   6)
5781 * genfile, creating sparse files:        Generate Mode.       (line  55)
5782 * genfile, generate mode:                Generate Mode.       (line   6)
5783 * genfile, reading a list of file names: Generate Mode.       (line  22)
5784 * genfile, seeking to a given offset:    Generate Mode.       (line  18)
5785 * Getting program version number:        help.                (line   6)
5786 * git, excluding files:                  exclude.             (line  37)
5787 * GNU archive format:                    gnu.                 (line   6)
5788 * GNU.sparse.major, extended header variable: PAX 1.          (line  14)
5789 * GNU.sparse.map, extended header variable: PAX 0.            (line  60)
5790 * GNU.sparse.minor, extended header variable: PAX 1.          (line  17)
5791 * GNU.sparse.name, extended header variable: PAX 0.           (line  68)
5792 * GNU.sparse.name, extended header variable, in v.1.0: PAX 1. (line  24)
5793 * GNU.sparse.numblocks, extended header variable: PAX 0.      (line  15)
5794 * GNU.sparse.numbytes, extended header variable: PAX 0.       (line  21)
5795 * GNU.sparse.offset, extended header variable: PAX 0.         (line  18)
5796 * GNU.sparse.realsize, extended header variable: PAX 1.       (line  24)
5797 * GNU.sparse.size, extended header variable: PAX 0.           (line  11)
5798 * gnupg, using with tar:                 gzip.                (line 193)
5799 * gpg, using with tar:                   gzip.                (line 193)
5800 * gzip:                                  gzip.                (line   6)
5801 * hard links, dereferencing:             hard links.          (line   6)
5802 * header-col:                            Configuring Help Summary.
5803                                                               (line 140)
5804 * hook:                                  User Hooks.          (line  13)
5805 * hour in date strings:                  Relative items in date strings.
5806                                                               (line  15)
5807 * ignore-archive:                        warnings.            (line  58)
5808 * ignore-newer:                          warnings.            (line  83)
5809 * Ignoring end-of-archive blocks:        Ignore Zeros.        (line   6)
5810 * Ignoring unknown extended header keyword `%s', warning message: warnings.
5811                                                               (line  86)
5812 * implausibly old time stamp %s, warning message: warnings.   (line  72)
5813 * Info script:                           Multi-Volume Archives.
5814                                                               (line  88)
5815 * Interactive operation:                 interactive.         (line   6)
5816 * ISO 8601 date format:                  Calendar date items. (line  30)
5817 * items in date strings:                 General date syntax. (line   6)
5818 * Labeling an archive:                   label.               (line   6)
5819 * labeling archives:                     Tape Files.          (line   6)
5820 * Labeling multi-volume archives:        label.               (line   6)
5821 * Labels on the archive media:           label.               (line   6)
5822 * language, in dates:                    General date syntax. (line  40)
5823 * Large lists of file names on small machines: Same Order.    (line   6)
5824 * large values:                          Large or Negative Values.
5825                                                               (line   6)
5826 * last DAY:                              Day of week items.   (line  15)
5827 * last in date strings:                  General date syntax. (line  26)
5828 * Laszlo Ersek:                          lbzip2.              (line   6)
5829 * lbzip2:                                lbzip2.              (line   6)
5830 * Listing all tar options:               help.                (line  27)
5831 * listing member and file names:         list.                (line  41)
5832 * Listing volume label:                  label.               (line  27)
5833 * Lists of file names:                   files.               (line   6)
5834 * Local and remote archives:             file.                (line  71)
5835 * long options:                          Long Options.        (line   6)
5836 * long options with mandatory arguments: Long Options.        (line  31)
5837 * long options with optional arguments:  Long Options.        (line  40)
5838 * long-opt-col:                          Configuring Help Summary.
5839                                                               (line  86)
5840 * lzip:                                  gzip.                (line   6)
5841 * lzma:                                  gzip.                (line   6)
5842 * lzop:                                  gzip.                (line   6)
5843 * MacKenzie, David:                      Authors of parse_datetime.
5844                                                               (line   6)
5845 * Malformed dumpdir: 'X' never used, warning message: warnings.
5846                                                               (line 116)
5847 * member:                                Definitions.         (line  15)
5848 * member name:                           Definitions.         (line  15)
5849 * members, multiple:                     multiple.            (line   6)
5850 * Members, replacing with other members: append.              (line  47)
5851 * Mercurial, excluding files:            exclude.             (line  37)
5852 * Meyering, Jim:                         Authors of parse_datetime.
5853                                                               (line   6)
5854 * Middle of the archive, starting in the: Starting File.      (line  11)
5855 * midnight in date strings:              Time of day items.   (line  22)
5856 * minute in date strings:                Relative items in date strings.
5857                                                               (line  15)
5858 * minutes, time zone correction by:      Time of day items.   (line  30)
5859 * Modes of extracted files:              Setting Access Permissions.
5860                                                               (line   6)
5861 * Modification time, excluding files by: after.               (line   6)
5862 * Modification times of extracted files: Data Modification Times.
5863                                                               (line   6)
5864 * month in date strings:                 Relative items in date strings.
5865                                                               (line  15)
5866 * month names in date strings:           Calendar date items. (line  38)
5867 * months, written-out:                   General date syntax. (line  36)
5868 * MT:                                    General-Purpose Variables.
5869                                                               (line  69)
5870 * MT_BEGIN:                              Magnetic Tape Control.
5871                                                               (line  11)
5872 * MT_OFFLINE:                            Magnetic Tape Control.
5873                                                               (line  32)
5874 * MT_REWIND:                             Magnetic Tape Control.
5875                                                               (line  21)
5876 * MT_STATUS:                             Magnetic Tape Control.
5877                                                               (line  42)
5878 * Multi-volume archives:                 Multi-Volume Archives.
5879                                                               (line   6)
5880 * multiple members:                      multiple.            (line   6)
5881 * Mutli-volume archives in PAX format, extracting using non-GNU tars: Split Recovery.
5882                                                               (line  17)
5883 * Mutli-volume archives, extracting using non-GNU tars: Split Recovery.
5884                                                               (line   6)
5885 * Naming an archive:                     file.                (line   6)
5886 * negative time stamps:                  Large or Negative Values.
5887                                                               (line   6)
5888 * new-directory:                         warnings.            (line 110)
5889 * next DAY:                              Day of week items.   (line  15)
5890 * next in date strings:                  General date syntax. (line  26)
5891 * none:                                  warnings.            (line  29)
5892 * noon in date strings:                  Time of day items.   (line  22)
5893 * now in date strings:                   Relative items in date strings.
5894                                                               (line  33)
5895 * ntape device:                          Many.                (line   6)
5896 * NUL-terminated file names:             nul.                 (line   6)
5897 * Number of blocks per record:           Blocking Factor.     (line   6)
5898 * Number of bytes per record:            Blocking Factor.     (line   6)
5899 * numbered backup method:                backup.              (line  55)
5900 * numbers, written-out:                  General date syntax. (line  26)
5901 * Obtaining help:                        help.                (line  27)
5902 * Obtaining total status information:    verbose.             (line  46)
5903 * Old GNU archive format:                gnu.                 (line   6)
5904 * Old GNU sparse format:                 Old GNU Format.      (line   6)
5905 * old option style:                      Old Options.         (line   6)
5906 * old options with mandatory arguments:  Old Options.         (line  17)
5907 * Old style archives:                    old.                 (line   6)
5908 * Old style format:                      old.                 (line   6)
5909 * opt-doc-col:                           Configuring Help Summary.
5910                                                               (line 126)
5911 * option syntax, traditional:            Old Options.         (line  58)
5912 * optional arguments to long options:    Long Options.        (line  40)
5913 * optional arguments to short options:   Short Options.       (line  22)
5914 * options for use with --extract:        extract options.     (line   6)
5915 * Options when reading archives:         Reading.             (line   6)
5916 * Options, archive format specifying:    Format Variations.   (line   6)
5917 * Options, format specifying:            Format Variations.   (line   6)
5918 * options, GNU style:                    Long Options.        (line   6)
5919 * options, long style:                   Long Options.        (line   6)
5920 * options, mixing different styles:      Mixing.              (line   6)
5921 * options, mnemonic names:               Long Options.        (line   6)
5922 * options, old style:                    Old Options.         (line   6)
5923 * options, short style:                  Short Options.       (line   6)
5924 * options, traditional:                  Short Options.       (line   6)
5925 * ordinal numbers:                       General date syntax. (line  26)
5926 * Overwriting old files, prevention:     Dealing with Old Files.
5927                                                               (line  16)
5928 * parse_datetime:                        Date input formats.  (line   6)
5929 * pattern, genfile:                      Generate Mode.       (line  39)
5930 * PAX archive format:                    posix.               (line   6)
5931 * Permissions of extracted files:        Setting Access Permissions.
5932                                                               (line   6)
5933 * Pinard, F.:                            Authors of parse_datetime.
5934                                                               (line  19)
5935 * pm in date strings:                    Time of day items.   (line  22)
5936 * POSIX archive format:                  posix.               (line   6)
5937 * Progress information:                  verbose.             (line  83)
5938 * Protecting old files:                  Dealing with Old Files.
5939                                                               (line  26)
5940 * pure numbers in date strings:          Pure numbers in date strings.
5941                                                               (line   6)
5942 * RCS, excluding files:                  exclude.             (line  37)
5943 * Reading file names from a file:        files.               (line   6)
5944 * Reading incomplete records:            Reading.             (line   6)
5945 * record:                                Blocking.            (line   6)
5946 * Record Size:                           Blocking Factor.     (line   6)
5947 * Records, incomplete:                   Reading.             (line   6)
5948 * Recursion in directories, avoiding:    recurse.             (line   6)
5949 * relative items in date strings:        Relative items in date strings.
5950                                                               (line   6)
5951 * Remote devices:                        file.                (line  60)
5952 * remote tape drive:                     Remote Tape Server.  (line   6)
5953 * Removing files from an archive:        delete.              (line   6)
5954 * rename-directory:                      warnings.            (line 108)
5955 * Replacing members with other members:  append.              (line  47)
5956 * reporting bugs:                        Reports.             (line   6)
5957 * RESTORE_BEGIN:                         User Hooks.          (line  39)
5958 * RESTORE_END:                           User Hooks.          (line  42)
5959 * Resurrecting files from an archive:    extract.             (line   6)
5960 * Retrieving files from an archive:      extract.             (line   6)
5961 * return status:                         Synopsis.            (line  67)
5962 * rmargin:                               Configuring Help Summary.
5963                                                               (line 158)
5964 * rmt:                                   Remote Tape Server.  (line   6)
5965 * RSH:                                   General-Purpose Variables.
5966                                                               (line  72)
5967 * RSH_COMMAND:                           General-Purpose Variables.
5968                                                               (line  77)
5969 * Running out of space:                  Scarce.              (line   8)
5970 * Salz, Rich:                            Authors of parse_datetime.
5971                                                               (line   6)
5972 * SCCS, excluding files:                 exclude.             (line  37)
5973 * short options:                         Short Options.       (line   6)
5974 * short options with mandatory arguments: Short Options.      (line  13)
5975 * short options with optional arguments: Short Options.       (line  22)
5976 * short-opt-col:                         Configuring Help Summary.
5977                                                               (line  78)
5978 * simple backup method:                  backup.              (line  64)
5979 * SIMPLE_BACKUP_SUFFIX:                  backup.              (line  68)
5980 * sleep, checkpoint action:              checkpoints.         (line  90)
5981 * SLEEP_MESSAGE:                         General-Purpose Variables.
5982                                                               (line 111)
5983 * SLEEP_TIME:                            General-Purpose Variables.
5984                                                               (line  97)
5985 * Small memory:                          Scarce.              (line   8)
5986 * snapshot file, format 0:               Snapshot Files.      (line  23)
5987 * snapshot file, format 1:               Snapshot Files.      (line  47)
5988 * snapshot file, format 2:               Snapshot Files.      (line  69)
5989 * snapshot files, editing:               Fixing Snapshot Files.
5990                                                               (line   6)
5991 * snapshot files, fixing device numbers: Fixing Snapshot Files.
5992                                                               (line   6)
5993 * socket ignored, warning message:       warnings.            (line  50)
5994 * Sparse Files:                          sparse.              (line   6)
5995 * sparse files v.0.0, extracting with non-GNU tars: Sparse Recovery.
5996                                                               (line  92)
5997 * sparse files v.0.1, extracting with non-GNU tars: Sparse Recovery.
5998                                                               (line  92)
5999 * sparse files v.1.0, extracting with non-GNU tars: Sparse Recovery.
6000                                                               (line  17)
6001 * Sparse files, creating using genfile:  Generate Mode.       (line  55)
6002 * sparse files, extracting with non-GNU tars: Sparse Recovery.
6003                                                               (line   6)
6004 * sparse formats:                        Sparse Formats.      (line   6)
6005 * sparse formats, defined:               sparse.              (line  50)
6006 * sparse formats, Old GNU:               Old GNU Format.      (line   6)
6007 * sparse formats, v.0.0:                 PAX 0.               (line   6)
6008 * sparse formats, v.0.1:                 PAX 0.               (line  52)
6009 * sparse formats, v.1.0:                 PAX 1.               (line   6)
6010 * sparse versions:                       Sparse Formats.      (line   6)
6011 * Specifying archive members:            Selecting Archive Members.
6012                                                               (line   6)
6013 * Specifying files to act on:            Selecting Archive Members.
6014                                                               (line   6)
6015 * Standard input and output:             file.                (line  39)
6016 * Standard output, writing extracted files to: Writing to Standard Output.
6017                                                               (line   6)
6018 * Storing archives in compressed format: gzip.                (line   6)
6019 * SVN, excluding files:                  exclude.             (line  37)
6020 * Symbolic link as file name:            dereference.         (line   6)
6021 * symlink-cast:                          warnings.            (line  77)
6022 * TAPE:                                  file tutorial.       (line  14)
6023 * tape blocking:                         Blocking Factor.     (line 194)
6024 * tape marks:                            Many.                (line  44)
6025 * tape positioning:                      Many.                (line  26)
6026 * TAPE_FILE:                             General-Purpose Variables.
6027                                                               (line  19)
6028 * Tapes, using --delete and:             delete.              (line  17)
6029 * TAR:                                   General-Purpose Variables.
6030                                                               (line 115)
6031 * tar:                                   What tar Does.       (line   6)
6032 * tar archive:                           Definitions.         (line   6)
6033 * Tar archive formats:                   Formats.             (line   6)
6034 * tar entry:                             Naming tar Archives. (line  11)
6035 * tar file:                              Naming tar Archives. (line  11)
6036 * tar to a remote device:                file.                (line  60)
6037 * tar to standard input and output:      file.                (line  39)
6038 * tar-snapshot-edit:                     Fixing Snapshot Files.
6039                                                               (line  15)
6040 * TAR_ARCHIVE, checkpoint script environment: checkpoints.    (line 108)
6041 * TAR_ARCHIVE, info script environment variable: Multi-Volume Archives.
6042                                                               (line 108)
6043 * TAR_ARCHIVE, to-command environment:   Writing to an External Program.
6044                                                               (line  76)
6045 * TAR_ATIME, to-command environment:     Writing to an External Program.
6046                                                               (line  49)
6047 * TAR_BLOCKING_FACTOR, checkpoint script environment: checkpoints.
6048                                                               (line 111)
6049 * TAR_BLOCKING_FACTOR, info script environment variable: Multi-Volume Archives.
6050                                                               (line 111)
6051 * TAR_BLOCKING_FACTOR, to-command environment: Writing to an External Program.
6052                                                               (line  79)
6053 * TAR_CHECKPOINT, checkpoint script environment: checkpoints. (line 114)
6054 * TAR_CTIME, to-command environment:     Writing to an External Program.
6055                                                               (line  58)
6056 * TAR_FD, info script environment variable: Multi-Volume Archives.
6057                                                               (line 125)
6058 * TAR_FILENAME, to-command environment:  Writing to an External Program.
6059                                                               (line  37)
6060 * TAR_FILETYPE, to-command environment:  Writing to an External Program.
6061                                                               (line  22)
6062 * TAR_FORMAT, checkpoint script environment: checkpoints.     (line 121)
6063 * TAR_FORMAT, info script environment variable: Multi-Volume Archives.
6064                                                               (line 121)
6065 * TAR_FORMAT, to-command environment:    Writing to an External Program.
6066                                                               (line  85)
6067 * TAR_GID, to-command environment:       Writing to an External Program.
6068                                                               (line  67)
6069 * TAR_GNAME, to-command environment:     Writing to an External Program.
6070                                                               (line  46)
6071 * TAR_MODE, to-command environment:      Writing to an External Program.
6072                                                               (line  34)
6073 * TAR_MTIME, to-command environment:     Writing to an External Program.
6074                                                               (line  55)
6075 * TAR_OPTIONS, environment variable:     using tar options.   (line  30)
6076 * TAR_REALNAME, to-command environment:  Writing to an External Program.
6077                                                               (line  40)
6078 * TAR_SIZE, to-command environment:      Writing to an External Program.
6079                                                               (line  61)
6080 * TAR_SUBCOMMAND, checkpoint script environment: checkpoints. (line 117)
6081 * TAR_SUBCOMMAND, info script environment variable: Multi-Volume Archives.
6082                                                               (line 117)
6083 * TAR_UID, to-command environment:       Writing to an External Program.
6084                                                               (line  64)
6085 * TAR_UNAME, to-command environment:     Writing to an External Program.
6086                                                               (line  43)
6087 * TAR_VERSION, checkpoint script environment: checkpoints.    (line 105)
6088 * TAR_VERSION, info script environment variable: Multi-Volume Archives.
6089                                                               (line 105)
6090 * TAR_VERSION, to-command environment:   Writing to an External Program.
6091                                                               (line  73)
6092 * TAR_VOLUME, info script environment variable: Multi-Volume Archives.
6093                                                               (line 114)
6094 * TAR_VOLUME, to-command environment:    Writing to an External Program.
6095                                                               (line  82)
6096 * tarcat:                                Tarcat.              (line   6)
6097 * this in date strings:                  Relative items in date strings.
6098                                                               (line  33)
6099 * time of day item:                      Time of day items.   (line   6)
6100 * time stamp %s is %s s in the future, warning message: warnings.
6101                                                               (line  72)
6102 * time zone correction:                  Time of day items.   (line  30)
6103 * time zone item <1>:                    Time zone items.     (line   6)
6104 * time zone item:                        General date syntax. (line  44)
6105 * timestamp:                             warnings.            (line  72)
6106 * today in date strings:                 Relative items in date strings.
6107                                                               (line  33)
6108 * tomorrow in date strings:              Relative items in date strings.
6109                                                               (line  29)
6110 * ttyout, checkpoint action:             checkpoints.         (line  70)
6111 * TZ:                                    Specifying time zone rules.
6112                                                               (line   6)
6113 * Ultrix 3.1 and write failure:          Remote Tape Server.  (line  40)
6114 * Unknown file type `%c', extracted as normal file, warning message: warnings.
6115                                                               (line  80)
6116 * Unknown file type; file ignored, warning message: warnings. (line  50)
6117 * unknown-cast:                          warnings.            (line  80)
6118 * unknown-keyword:                       warnings.            (line  86)
6119 * unpacking:                             Definitions.         (line  22)
6120 * Updating an archive:                   update.              (line   6)
6121 * usage-indent:                          Configuring Help Summary.
6122                                                               (line 154)
6123 * Using encrypted archives:              gzip.                (line 193)
6124 * ustar archive format:                  ustar.               (line   6)
6125 * uuencode:                              Applications.        (line   8)
6126 * v7 archive format:                     old.                 (line   6)
6127 * VCS, excluding files:                  exclude.             (line  37)
6128 * Verbose operation:                     verbose.             (line  18)
6129 * Verifying a write operation:           verify.              (line   6)
6130 * Verifying the currency of an archive:  compare.             (line   6)
6131 * version control system, excluding files: exclude.           (line  37)
6132 * Version of the tar program:            help.                (line   6)
6133 * version-control Emacs variable:        backup.              (line  49)
6134 * VERSION_CONTROL:                       backup.              (line  41)
6135 * volno file:                            Multi-Volume Archives.
6136                                                               (line  79)
6137 * VOLNO_FILE:                            General-Purpose Variables.
6138                                                               (line  82)
6139 * Volume label, listing:                 label.               (line  27)
6140 * Volume number file:                    Multi-Volume Archives.
6141                                                               (line  79)
6142 * week in date strings:                  Relative items in date strings.
6143                                                               (line  15)
6144 * Where is the archive?:                 file.                (line   6)
6145 * Working directory, specifying:         directory.           (line   6)
6146 * Writing extracted files to standard output: Writing to Standard Output.
6147                                                               (line   6)
6148 * Writing new archives:                  file.                (line  34)
6149 * xdev:                                  warnings.            (line  47)
6150 * XLIST:                                 General-Purpose Variables.
6151                                                               (line  87)
6152 * xsparse:                               Sparse Recovery.     (line  13)
6153 * year in date strings:                  Relative items in date strings.
6154                                                               (line  15)
6155 * yesterday in date strings:             Relative items in date strings.
6156                                                               (line  29)