home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd2.bin / dosutils / gtar109 / tar.txt < prev    next >
Text File  |  1998-07-07  |  52KB  |  1,163 lines

  1. This file documents the tape archive of the GNU system.
  2.  
  3.    Copyright (C) 1988 Free Software Foundation, Inc.
  4.  
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8.  
  9.    Permission is granted to copy and distribute modified versions of
  10. this manual under the conditions for verbatim copying, provided that
  11. the entire resulting derived work is distributed under the terms of a
  12. permission notice identical to this one.
  13.  
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions.
  17.  
  18. Preface
  19. *******
  20.  
  21.    This manual describes the GNU tape archiver, `tar', and how you can
  22. use it to store copies of a file or a group of files in an "archive".
  23. This archive may be written directly to a magnetic tape or other
  24. storage medium, stored as a file, or sent through a pipe to another
  25. program.  `tar' can also be used to add files to an already existing
  26. archive, list the files in an archive, or extract the files in the
  27. archive.
  28.  
  29.    GNU `tar' was written by John Gilmore, and modified by many people.
  30. The GNU enhancements were written by Jay Fenlason.
  31.  
  32. Using the Tape Archiver
  33. ***********************
  34.  
  35.    You can use the GNU tape archiver, `tar', to store copies of a file
  36. or a group of files in an "archive".  This archive may be written
  37. directly to a magnetic tape or other storage medium, stored as a file,
  38. or sent through a pipe to another program.  `tar' can also be used to
  39. add files to an already existing archive, list the files in an archive,
  40. or extract the files in the archive.
  41.  
  42. The Uses of Tape Archives
  43. *************************
  44.  
  45.    The tape archiver `tar' allows you to store many files in an
  46. "archive file" or "tar file" which describes the names and contents of
  47. the constituent files.  Later you can extract some or all of these files
  48. from the archive.
  49.  
  50.    Tar files are not restricted to magnetic tapes.  The `tar' program
  51. can equally well use an ordinary file, or a pipe, or any device, as the
  52. archive.  But they were originally designed for use with magnetic tapes,
  53. and that is how the name "tar" came about.
  54.  
  55.    Archive files can be used for transporting a group of files from one
  56. system to another:  put all relevant files into an archive on one
  57. computer system, transfer the archive to another, and extract the
  58. contents there.  The basic transfer medium might be magnetic tape,
  59. Internet FTP, or even electronic mail (though you must encode the
  60. archive with `uuencode' in order to transport it properly by mail).
  61. Both machines do not have to use the same operating system, as long as
  62. they both support the `tar' program.
  63.  
  64.    A magnetic tape can store several files in sequence, but has no
  65. names for them, just relative position on the tape.  A tar file or
  66. something like it is the only way to store several files on one tape
  67. and retain their names.  Even when the basic transfer mechanism can
  68. keep track of names, as FTP can, the nuisance of handling multiple
  69. files, directories, and multiple links, may make a tar file a much
  70. easier method.
  71.  
  72.    Archive files are also used for long-term storage, which you can
  73. think of as transportation from one time to another.
  74.  
  75.    Piping one `tar' to another is an easy way to copy a directory's
  76. contents from one disk to another, while preserving the dates, modes,
  77. owners and link-structure of all the files therein.
  78.  
  79.    The GNU version of `tar' has special features that allow it to be
  80. used to make incremental and full dumps of all the files in a
  81. filesystem.
  82.  
  83. The Different Operations `tar' Can Perform
  84. ******************************************
  85.  
  86.    One program, `tar', is used to create an archive, to extract files
  87. from an archive, to modify an archive, or to list the contents.  Each
  88. time you run `tar', you must give a "command" to specify which one of
  89. these things you want to do.
  90.  
  91.    The command must always be in the first argument to `tar'.  This
  92. argument can also contain options (*note Options::.).  For compatibility
  93. with Unix `tar', the first argument is always treated as containing
  94. command and option letters even if it doesn't start with `-'.  Thus,
  95. `tar c' is equivalent to `tar -c': both of them specify the `-c'
  96. command to create an archive.
  97.  
  98.    In addition, a set of long-named options are provided which can be
  99. used instead of or inter-mixed with the single-letter flags.  The
  100. long-named options are meant to be easy to remember and logical, while
  101. the single letter flags may not always be.  Long-named options are
  102. preceded by a `+'.  In the list of single-letter commands below, each
  103. corresponding long-named option is listed next to it, in parentheses.
  104.  
  105.    The remaining arguments to `tar' are either options, if they start
  106. with `-' or `+', or files to operate on.
  107.  
  108.    The file names that you give as arguments are the files that `tar'
  109. will act on - for example, they are the files to put in the archive, or
  110. the files to extract from it.  If you don't give any file name
  111. arguments, the default depends on which command you used.  Some
  112. commands use all relevant files; some commands have no default and will
  113. report an error if you don't specify files.
  114.  
  115.    If a file name argument actually names a directory, then that
  116. directory and all files and subdirectories in it are used.
  117.  
  118.    Here is a list of all the `tar' commands:
  119.  
  120. `-c'
  121. `+create'
  122.      This command tells `tar' to create a new archive that contains the
  123.      file(s) specified on the command line.  If you don't specify
  124.      files, all the files in the current directory are used.
  125.  
  126.      If the archive file already exists, it is overwritten; the old
  127.      contents are lost.
  128.  
  129. `-d'
  130. `+compare'
  131. `+diff'
  132.      This command causes `tar' to compare the archive with the files in
  133.      the file system.  It will report differences in file size, mode,
  134.      owner, and contents.  If a file exists in the archive, but not in
  135.      the file system, `tar' will report this.
  136.  
  137.      If you specify file names, those files are compared with the tape
  138.      and they must all exist in the archive.  If you don't specify
  139.      files, all the files in the archive are compared.
  140.  
  141. `-r'
  142. `+append'
  143.      This command causes `tar' to add the specified file(s) to the end
  144.      of the archive.  This assumes that the archive file already exists
  145.      and is in the proper format (which probably means it was created
  146.      previously with the `tar' program).  If the archive is not in a
  147.      format that `tar' understands, the results will be unpredictable.
  148.  
  149.      You must specify the files to be used; there is no default.
  150.  
  151. `-t'
  152. `+list'
  153.      This command causes `tar' to display a list of the files in the
  154.      archive.  If you specify file names, only the files hat you
  155.      specify will be mentioned (but each of them is mentioned only if
  156.      it appears in the archive).
  157.  
  158. `-u'
  159. `+update'
  160.      This command causes `tar' to add the specified files to the end of
  161.      the archive, like `-r', but only when a file doesn't already exist
  162.      in the archive or is newer than the version in the archive (the
  163.      last-modification time is compared).  Adding files to the end of an
  164.      archive can be very slow.
  165.  
  166.      You must specify the files to be used; there is no default.
  167.  
  168. `-x'
  169. `+extract'
  170. `+get'
  171.      This command causes `tar' to extract the specified files from the
  172.      archive.  If no file names are given, all the files in the archive
  173.      will be extracted.
  174.  
  175. `-A'
  176. `+catenate'
  177. `+concatenate'
  178.      This command is used for concatenating several archive files into
  179.      one big archive file.  The files to operate on should all be
  180.      archive files.  They are all appended to the end of *the* archive
  181.      file which `tar' works on.  (The other files are not changed).
  182.  
  183.      You might be tempted to use `cat' for this, but it won't ordinarily
  184.      work.  A `tar' archive contains data which indicates the end of the
  185.      archive, so more material added to the end with `cat' would be
  186.      ignored.  This command works because it removes the end-of-archive
  187.      markers from the middle of the result.
  188.  
  189. `-D'
  190. `+delete'
  191.      This command causes `tar' to delete the specified files from the
  192.      archive.  This command is extremely slow.  Warning: Use of this
  193.      command on archives stored on magnetic tape may result in a
  194.      scrambled archive.  There is no safe way (except for completely
  195.      re-writing the archive) to delete files from a magnetic tape.
  196.  
  197. Options That Change How `tar' Works
  198. ***********************************
  199.  
  200.    Options may be specified as individual arguments starting with `-'.
  201. In this case, if the option wants an argument (as does, for example,
  202. `-f') then the argument should come after the option, separated from it
  203. by a space.  All options are optional.  Some options make sense with
  204. any command, while others are meaningful only with particular commands.
  205.  
  206. Options That Are Always Meaningful
  207. ==================================
  208.  
  209. `-b NUMBER'
  210. `+block-size NUMBER'
  211.      This option is used to specify a "blocking factor" for the
  212.      archive.  When reading or writing the archive, `tar', will do
  213.      reads and writes of the archive in blocks of NUMBER*512 bytes.
  214.  
  215.      The default blocking factor is set when `tar' is compiled, and is
  216.      typically 20.
  217.  
  218.      Blocking factors larger than 20 cannot be read by very old
  219.      versions of `tar', or by some newer versions of `tar' running on
  220.      old machines with small address spaces.
  221.  
  222.      With a magnetic tape, larger blocks give faster throughput and fit
  223.      more data on a tape (because there are fewer inter-record gaps).
  224.      If the archive is in a disk file or a pipe, you may want to
  225.      specify a smaller blocking factor, since a large one will result
  226.      in a large number of null bytes at the end of the archive.
  227.  
  228.      When writing cartridge or other streaming tapes, a much larger
  229.      blocking factor (say 126 or more) will greatly increase
  230.      performance.  However, you must specify the same blocking factor
  231.      when reading or updating the archive.
  232.  
  233.      With GNU `tar' the blocking factor is limited only by the maximum
  234.      block size of the device containing the archive, or by the amount
  235.      of available virtual memory.
  236.  
  237. `-f FILENAME'
  238. `+file FILENAME'
  239.      This option is used to specify the file name of the archive `tar'
  240.      works on.
  241.  
  242.      If this option is not given, but the environment variable `TAPE'
  243.      is set, its value is used; otherwise, a default archive name
  244.      (which was picked when `tar' was compiled) is used.  The default
  245.      is normally set up to be the "first" tape drive or other
  246.      transportable I/O medium on the system.
  247.  
  248.      If the filename is `-', `tar' reads the archive from standard
  249.      input (when listing or extracting), or writes it to standard
  250.      output (when creating).  If the `-' filename is given when
  251.      updating an archive, `tar' will read the original archive from its
  252.      standard input, and will write the entire new archive to its
  253.      standard output.
  254.  
  255.      If the filename contains `:/dev/', it is interpreted as
  256.      `hostname:filename'.  If the HOSTNAME contains an "at" sign (`@'),
  257.      it is treated as `user@hostname:filename'.  In either case, `tar'
  258.      will invoke the command `rsh' (or `remsh') to start up an
  259.      `/etc/rmt' on the remote machine.  If you give an alternate login
  260.      name, it will be given to the `rsh'.  Naturally, the remote
  261.      machine must have a copy of `/etc/rmt'.  `/etc/rmt' is free
  262.      software from the University of California, and a copy of the
  263.      source code can be found with the sources for `tar'.  `/etc/rmt'
  264.      will have to be modified to run on non-BSD4.3 systems.
  265.  
  266. `-C DIR'
  267. `+directory DIR'
  268.      This option causes `tar' to change into the directory DIR before
  269.      continuing.  This option is usually interspersed with the files
  270.      `tar' is to work on.  For example,
  271.  
  272.           tar -c iggy ziggy -C baz melvin
  273.  
  274.      will place the files `iggy' and `ziggy' from the current directory
  275.      on the tape, followed by the file `melvin' from the directory
  276.      `baz'.  This option is especially useful when you have several
  277.      widely separated files that you want to store in the same
  278.      directory in the archive.
  279.  
  280.      Note that the file `melvin' is recorded in the archive under the
  281.      precise name `melvin', *not* `baz/melvin'.  Thus, the archive will
  282.      contain three files that all appear to have come from the same
  283.      directory; if the archive is extracted with plain `tar -x', all
  284.      three files will be created in the current directory.
  285.  
  286.      Contrast this with the command
  287.  
  288.           tar -c iggy ziggy bar/melvin
  289.  
  290.      which records the third file in the archive under the name
  291.      `bar/melvin' so that, if plain `tar -x' is used, the third file
  292.      will be created in a subdirectory named `bar'.
  293.  
  294. `-M'
  295. `+multi-volume'
  296.      This option causes `tar' to write a "multi-volume" archive-one
  297.      that may be larger than will fit on the medium used to hold it.
  298.  
  299.      When this option is used, `tar' will not abort when it cannot read
  300.      or write any more data.  Instead, it will ask you to prepare a new
  301.      volume.  If the archive is on a magnetic tape, you should change
  302.      tapes now; if the archive is on a floppy disk, you should change
  303.      disks, etc.
  304.  
  305.      Each volume of a multi-volume archive is an independent tar
  306.      archive, complete in itself.  For example, you can list or extract
  307.      any volume alone (just don't specify `-M').  However, if one file
  308.      in the archive is split across volumes, the only way to extract it
  309.      successfully is with a multi-volume extract command (`-xM')
  310.      starting on or before the volume where the file begins.
  311.  
  312. `-N (+after-date) DATE'
  313.      This option causes `tar' to only work on files whose modification
  314.      or inode-changed times are newer than the DATE given.  The main
  315.      use is for creating an archive; then only new files are written.
  316.      If extracting, only newer files are extracted.
  317.  
  318.      Remember that the entire date argument should be quoted if it
  319.      contains any spaces.
  320.  
  321.      The date is parsed using `getdate'.
  322.  
  323. `-R (+record-number)'
  324.      If `-R' is used, `tar' prints, along with every message it would
  325.      normally produce, the record number within the archive where the
  326.      message occurred.  This option is especially useful when reading
  327.      damaged archives, since it helps pinpoint the damaged sections.
  328.  
  329.      This can also be useful when making a log of a file-system backup
  330.      tape, since the results allow you to find the file you want to
  331.      retrieve on several backup tapes and choose the tape where the
  332.      file appears earliest (closest to the front of the tape).
  333.  
  334. `-T (+files-from) FILENAME'
  335.      Instead of taking the list of files to work on from the command
  336.      line, the list of files to work on is read from the file FILENAME.
  337.      If FILENAME is given as `-', the list is read from standard
  338.      input.  Note that using both `-T -' and `-f -' will not work
  339.      unless you are using the `-c' command.
  340.  
  341. `-v (+verbose)'
  342.      This option causes `tar' to be verbose about the actions it is
  343.      taking.
  344.  
  345.      Normally, the `-t' command to list an archive prints just the file
  346.      names (one per line) and the other commands are silent.
  347.  
  348.      `-tv' prints a full line of information about each file, like the
  349.      output of `ls -l'.  `-v' with any other command (aside from `-t')
  350.      prints just the name of each file operated on.
  351.  
  352.      The output from `-v' appears on the standard output except when
  353.      creating or updating an archive to the standard output, in which
  354.      case the output from `-v' is sent to the standard error.
  355.  
  356. `+version'
  357.      This option causes `tar' to print out its version number to the
  358.      standard error.  It has no equivalent short option name.
  359.  
  360. `-w (+interactive)'
  361.      This option causes `tar' to print a message for each action it
  362.      intends to take, and ask for confirmation on the terminal.  To
  363.      confirm, you must type a line of input.  If your input line begins
  364.      with `y', the action is performed, otherwise it is skipped.
  365.  
  366.      The actions which require confirmation include adding a file to the
  367.      archive, extracting a file from the archive, deleting a file from
  368.      the archive, and deleting a file from disk.
  369.  
  370.      If `tar' is reading the archive from the standard input, `tar'
  371.      will open the file `/dev/tty' to ask for confirmation on.
  372.  
  373. `-X (+exclude) FILE This option causes `tar' to'
  374.      read a list of filename regular expressions, one per line, from
  375.      the file FILE; `tar' will ignore files with those names.  Thus if
  376.      `tar' is called as `tar -c -X foo .'  and the file `foo' contains
  377.      `*.o' none of the files whose names end in `.o' in the current
  378.      directory (or any subdirectory of the current directory) will be
  379.      added to the archive.  Multiple `-X' options may be given.
  380.  
  381. `-z'
  382. `-Z (+compress or +uncompress)'
  383.      The archive should be compressed as it is written, or decompressed
  384.      as it is read, using the `compress' program.  This option works on
  385.      physical devices (tape drives, etc.) and remote files as well as
  386.      on normal files; data to or from such devices or remote files is
  387.      reblocked by another copy of the `tar' program to enforce the
  388.      specified (or default) block size.  The default compression
  389.      parameters are used; if you need to override them, avoid the `-z'
  390.      option and run `compress' explicitly.
  391.  
  392.      If the `-z' option is given twice, or the `+compress-block' option
  393.      is used, `tar' will pad the archive out to the next block boundry
  394.      (*note General Options::.).  This may be useful with some devices
  395.      that require that all write operations be a multiple of a certain
  396.      size.
  397.  
  398.      Note that the `-z' option will not work with the `-M' option, or
  399.      with the `-u', `-r', `-A', or `-D' commands.
  400.  
  401. Options for Creating Or Updating an Archive
  402. ===========================================
  403.  
  404.    These options are used to control which files `tar' puts in an
  405. archive, or to control the format the archive is written in (*note
  406. Format::.).
  407.  
  408.    Except as noted below, these options are useful with the `-c', `-r',
  409. `-u', `-A', and `-D' commands.  Also note that the `-B' option, (*note
  410. Extraction Options::.), is also useful with the `-r', `-u', `-A', and
  411. `-D' commands.
  412.  
  413. `-G (+incremental)'
  414.      This option should only be used when creating an incremental
  415.      backup of a filesystem.  When the `-G' option is used, `tar'
  416.      writes, at the beginning of the archive, an entry for each of the
  417.      directories that will be operated on.  The entry for a directory
  418.      includes a list of all the files in the directory at the time the
  419.      dump was done, and a flag for each file indicating whether the
  420.      file is going to be put in the archive.  This information is used
  421.      when doing a complete incremental restore.
  422.  
  423.      Note that this option causes `tar' to create a non-standard
  424.      archive that may not be readable by non-GNU versions of the `tar'
  425.      program.
  426.  
  427. `-h (+dereference)'
  428.      If `-h' is used, when `tar' encounters a symbolic link, it will
  429.      archive the linked-to file, instead of simply recording the
  430.      presence of a symbolic link.  If the linked-to file is archived
  431.      again, an entire second copy of it will be archived, instead of a
  432.      link.  This could be considered a bug.
  433.  
  434. `-l (+one-file-system)'
  435.      This option causes `tar' to not cross filesystem boundaries when
  436.      archiving parts of a directory tree.  This option only affects
  437.      files that are archived because they are in a directory that is
  438.      archived; files named on the command line are archived regardless,
  439.      and they can be from various file systems.
  440.  
  441.      This option is useful for making full or incremental archival
  442.      backups of a file system, as with the Unix `dump' command.
  443.  
  444.      Files which are skipped due to this option are mentioned on the
  445.      standard error.
  446.  
  447. `-o (+old-archive or +old or +portability)'
  448.      This option causes `tar' to write an old format archive, which
  449.      does not include information about directories, pipes, fifos,
  450.      contiguous files, or device files, and specifies file ownership by
  451.      numeric user- and group-ids rather than by user and group names.
  452.      In most cases, a *new* format archive can be read by an *old*
  453.      `tar' program without serious trouble, so this option should
  454.      seldom be needed.  When updating an archive, do not use `-o'
  455.      unless the archive was created with the `-o' option.
  456.  
  457. `-S (+sparse)'
  458.      This option causes all files to be put in the archive to be tested
  459.      for sparseness, and handled specially if they are.  The `-S' option
  460.      is useful when many dbm files, for example, are being backed up,
  461.      and running out of space on the tape is an issue.  Using this
  462.      option dramatically decreases the amount of space needed to store
  463.      such a file.
  464.  
  465.      In later versions, this option may be removed, and the testing and
  466.      treatment of sparse files may be done automatically with any
  467.      special GNU options.  For now, it is an option needing to be
  468.      specified on the command line with the creation or updating of an
  469.      archive.
  470.  
  471. `-V (+volume) NAME'
  472.      This option causes `tar' to write out a "volume header" at the
  473.      beginning of the archive.  If `-M' is used, each volume of the
  474.      archive will have a volume header of `NAME Volume N', where N is 1
  475.      for the first volume, 2 for the next, and so on.
  476.  
  477. `-W (+verify)'
  478.      This option causes `tar' to verify the archive after writing it.
  479.      Each volume is checked after it is written, and any discrepancies
  480.      are recorded on the standard error output.
  481.  
  482.      Verification requires that the archive be on a back-space-able
  483.      medium.  This means pipes, some cartridge tape drives, and some
  484.      other devices cannot be verified.
  485.  
  486. Options for Listing Or Extracting Files
  487. =======================================
  488.  
  489.    The options in this section are meaningful with the `-x' command.
  490. Unless otherwise stated, they are also meaningful with the `-t' command.
  491.  
  492. `-B (+read-full-blocks)'
  493.      If `-B' is used, `tar' will not panic if an attempt to read a
  494.      block from the archive does not return a full block.  Instead,
  495.      `tar' will keep reading until it has obtained a full block.
  496.  
  497.      This option is turned on by default when `tar' is reading an
  498.      archive from standard input, or from a remote machine.  This is
  499.      because on BSD Unix systems, a read of a pipe will return however
  500.      much happens to be in the pipe, even if it is less than `tar'
  501.      requested.  If this option was not used, `tar' would fail as soon
  502.      as it read an incomplete block from the pipe.
  503.  
  504.      This option is also useful with the commands for updating an
  505.      archive.
  506.  
  507. `-G (+incremental)'
  508.      The `-G' option means the archive is an incremental backup.  Its
  509.      meaning depends on the command that it modifies.
  510.  
  511.      If the `-G' option is used with `-t', `tar' will list, for each
  512.      directory in the archive, the list of files in that directory at
  513.      the time the archive was created.  This information is put out in
  514.      a format that is not easy for humans to read, but which is
  515.      unambiguous for a program: each filename is preceded by either a
  516.      `Y' if the file is present in the archive, an `N' if the file is
  517.      not included in the archive, or a `D' if the file is a directory
  518.      (and is included in the archive).  Each filename is terminated by
  519.      a null character.  The last file is followed by an additional null
  520.      and a newline to indicate the end of the data.
  521.  
  522.      If the `-G' option is used with `-x', then when the entry for a
  523.      directory is found, all files that currently exist in that
  524.      directory but are not listed in the archive *are deleted from the
  525.      directory*.
  526.  
  527.      This behavior is convenient when you are restoring a damaged file
  528.      system from a succession of incremental backups: it restores the
  529.      entire state of the file system to that which obtained when the
  530.      backup was made.  If you don't use `-G', the file system will
  531.      probably fill up with files that shouldn't exist any more.
  532.  
  533. `-i (+ignore-zeros)'
  534.      The `-i' option causes `tar' to ignore blocks of zeros in the
  535.      archive.  Normally a block of zeros indicates the end of the
  536.      archive, but when reading a damaged archive, or one which was
  537.      created by `cat'-ing several archives together, this option allows
  538.      `tar' to read the entire archive.  This option is not on by
  539.      default because many versions of `tar' write garbage after the
  540.      zeroed blocks.
  541.  
  542.      Note that this option causes `tar' to read to the end of the
  543.      archive file, which may sometimes avoid problems when multiple
  544.      files are stored on a single physical tape.
  545.  
  546. `-k (+keep-old-files)'
  547.      The `-k' option prevents `tar' from over-writing existing files
  548.      with files with the same name from the archive.
  549.  
  550.      The `-k' option is meaningless with `-t'.
  551.  
  552. `-K (+starting-file) FILENAME'
  553.      The `-K' option causes `tar' to begin extracting or listing the
  554.      archive with the file FILENAME, and to consider only the files
  555.      starting at that point in the archive.  This is useful if a
  556.      previous attempt to extract files failed when it reached FILENAME
  557.      due to lack of free space.  (This assumes, of course, that there
  558.      is now free space, or that you are now extracting into a different
  559.      file system.)
  560.  
  561. `-m'
  562.  
  563. `+modification-time'
  564.      When this option is used, `tar' leaves the modification times of
  565.      the files it extracts as the time when the files were extracted,
  566.      instead of setting it to the time recorded in the archive.
  567.  
  568.      This option is meaningless with `-t'.
  569.  
  570. `-O'
  571. `+to-stdout'
  572.      When this option is used, instead of creating the files specified,
  573.      `tar' writes the contents of the files extracted to its standard
  574.      output.  This may be useful if you are only extracting the files in
  575.      order to send them through a pipe.
  576.  
  577.      This option is meaningless with `-t'.
  578.  
  579. `-p'
  580. `+same-permissions'
  581. `+preserve-permissions'
  582.      This option causes `tar' to set the modes (access permissions) of
  583.      extracted files exactly as recorded in the archive.  If this
  584.      option is not used, the current `umask' setting limits the
  585.      permissions on extracted files.
  586.  
  587.      This option is meaningless with `-t'.
  588.  
  589. `-P'
  590. `+absolute-paths'
  591.      This option should be used when the absolute pathname of a file
  592.      should be preserved in the archive.  `tar' normally strips the
  593.      leading `/' from the name of the file, thus making
  594.      /usr/foo/bar/baz into usr/foo/bar/baz.  Using the `-P' option
  595.      keeps the pathname intact, and is useful in that it is not
  596.      necessary to change to the root directory when extracting files.
  597.  
  598. `-s'
  599. `+same-order'
  600. `+preserve-order'
  601.      This option tells `tar' that the list of filenames to be listed or
  602.      extracted is sorted in the same order as the files in the archive.
  603.      This allows a large list of names to be used, even on a small
  604.      machine that would not otherwise be able to hold all the names in
  605.      memory at the same time.  Such a sorted list can easily be created
  606.      by running `tar -t' on the archive and editing its output.
  607.  
  608.      This option is probably never needed on modern computer systems.
  609.  
  610. `+preserve'
  611.      The `+preserve' option has no equivalent short option name.  It is
  612.      equivalent to `-p' plus `-s'.
  613.  
  614. Old Syntax for Options
  615. ======================
  616.  
  617.    For compatibility with Unix `tar', the first argument can contain
  618. option letters in addition to the command letter; for example, `tar cv'
  619. specifies the option `-v' in addition to the command `-c'.  The first
  620. argument to GNU `tar' is always treated as command and option letters
  621. even if it doesn't start with `-'.
  622.  
  623.    Some options need their own arguments; for example, `-f' is followed
  624. by the name of the archive file.  When the option is given separately,
  625. its argument follows it, as is usual for Unix programs.  For example:
  626.  
  627.      tar -c -v -b 20 -f /dev/rmt0
  628.  
  629.    When options that need arguments are given together with the
  630. command, all the associated arguments follow, in the same order as the
  631. options.  Thus, the example above could also be written in the old
  632. style as follows:
  633.  
  634.      tar cvbf 20 /dev/rmt0
  635.  
  636. Here `20' is the argument of `-b' and `/dev/rmt0' is the argument of
  637. `-f'.
  638.  
  639.    The long-named options can be used instead of the single-letter
  640. flags.  They are meant to be obvious and easy to remember, possibly
  641. more so than their corresponding single-letter options.  The above
  642. example using long-named options would look like this:
  643.  
  644.      tar +create +verbose +block-size +file 20 /dev/rmt0
  645.  
  646. Using `tar' to Perform Full Dumps
  647. *********************************
  648.  
  649.    Full dumps should only be made when no other people or programs are
  650. modifying files in the filesystem.  If files are modified while `tar'
  651. is making the backup, they may not be stored properly in the archive,
  652. in which case you won't be able to restore them if you have to.
  653.  
  654.    You will want to use the `-V' option to give the archive a volume
  655. label, so you can tell what this archive is even if the label falls off
  656. the tape, or anything like that.
  657.  
  658.    Unless the filesystem you are dumping is guaranteed to fit on one
  659. volume, you will need to use the `-M' option.  Make sure you have
  660. enough tapes on hand to complete the backup.
  661.  
  662.    If you want to dump each filesystem separately you will need to use
  663. the `-l' option to prevent `tar' from crossing filesystem boundaries
  664. when storing (sub)directories.
  665.  
  666.    The `-G' option is not needed, since this is a complete copy of
  667. everything in the filesystem, and a full restore from this backup would
  668. only be done onto a completely empty disk.
  669.  
  670.    Unless you are in a hurry, and trust the `tar' program (and your
  671. tapes), it is a good idea to use the `-W' (verify) option, to make sure
  672. your files really made it onto the dump properly.  This will also
  673. detect cases where the file was modified while (or just after) it was
  674. being archived.
  675.  
  676. Using `tar' to Perform Incremental Dumps
  677. ****************************************
  678.  
  679.    Performing incremental dumps is similar to performing full dumps,
  680. although a few more options will usually be needed.
  681.  
  682.    You will need to use the `-N DATE' option to tell `tar' to only
  683. store files that have been modified since DATE.  DATE should be the
  684. date and time of the last full/incremental dump.
  685.  
  686.    A standard scheme is to do a `monthly' (full) dump once a month, a
  687. `weekly' dump once a week of everything since the last monthly and a
  688. `daily' every day of everything since the last (weekly or monthly) dump.
  689.  
  690.    Here is a copy of the script used to dump the filesystems of the
  691. machines here at the Free Software Foundation.  This script is run
  692. (semi-)automatically late at night when people are least likely to be
  693. using the machines.  This script dumps several filesystems from several
  694. machines at once (by using a network-filesystem).  The operator is
  695. responsible for ensuring that all the machines will be up at the time
  696. the dump happens.  If a machine is not running, its files will not be
  697. dumped, and the next day's incremental dump will *not* store files that
  698. would have gone onto that dump.
  699.  
  700.      #!/bin/csh
  701.      # Dump thingie
  702.      set now = `date`
  703.      set then = `cat date.nfs.dump`
  704.      /u/hack/bin/tar -c -G -v\
  705.       -f /dev/rtu20\
  706.       -b 126\
  707.       -N "$then"\
  708.       -V "Dump from $then to $now"\
  709.       /alpha-bits/gp\
  710.       /gnu/hack\
  711.       /hobbes/u\
  712.       /spiff/u\
  713.       /sugar-bombs/u
  714.      echo $now > date.nfs.dump
  715.      mt -f /dev/rtu20 rew
  716.  
  717.    Output from this script is stored in a file, for the operator to
  718. read later.
  719.  
  720.    This script uses the file `date.nfs.dump' to store the date/time of
  721. the last dump.
  722.  
  723.    Since this is a streaming tape drive, no attempt to verify the
  724. archive is done.  This is also why the high blocking factor (126) is
  725. used.  The tape drive must also be rewound by the `mt' command after
  726. the dump is made.
  727.  
  728. Common Problems Using `tar'
  729. ***************************
  730.  
  731.    Unless you use the `-P' option, GNU `tar' will not allow you to
  732. create an archive that contains absolute pathnames.  (An absolute
  733. pathname is one that begins with a `/'.) If you try, `tar' will
  734. automatically remove the leading `/' from the file names it stores in
  735. the archive.  It will also type a warning message telling you what it
  736. is doing.
  737.  
  738.    When reading an archive that was created with a different `tar'
  739. program, GNU `tar' automatically extracts entries in the archive which
  740. have absolute pathnames as if the pathnames were not absolute.  If the
  741. archive contained a file `/usr/bin/computoy', GNU `tar' would extract
  742. the file to `usr/bin/computoy' in the current directory.  If you want
  743. to extract the files in an archive to the same absolute names that they
  744. had when the archive was created, you should do a `cd /' before
  745. extracting the files from the archive, or you should either use the
  746. `-P' option, or use the command `tar -C / ...'.
  747.  
  748.    Some versions of UNIX, (Ultrix 3.1 is know to have this problem) can
  749. claim that a short write near the end of a tape succeeded, when it
  750. actually failed.  This will result in the -M option not working
  751. correctly.  The best workaround at the moment is to use a significantly
  752. larger blocksize than the default 20.
  753.  
  754.    In order to update an archive, `tar' must be able to backspace the
  755. archive in order to re-read or re-write a block that was just read (or
  756. written).  This is currently possible only on two kinds of files:
  757. normal disk files (or any other file that can be backspaced with
  758. `lseek()'), and industry-standard 9-track magnetic tape (or any other
  759. kind of tape that can be backspaced with `ioctl(...,MTIOCTOP,...)').
  760.  
  761.    This means that the `-r', `-u', `-A', and `-D' commands will not
  762. work on any other kind of file.  Some media simply cannot be
  763. backspaced, which means these commands and options will never be able
  764. to work on them.  These non-backspacing media include pipes and
  765. cartridge tape drives.
  766.  
  767.    Some other media can be backspaced, and `tar' will work on them once
  768. `tar' is modified to do so.
  769.  
  770.    Archives created with the `-M', `-V', and `-G' options may not be
  771. readable by other version of `tar'.  In particular, restoring a file
  772. that was split over a volume boundary will require some careful work
  773. with `dd', if it can be done at all.  Other versions of `tar' may also
  774. create an empty file whose name is that of the volume header.  Some
  775. versions of `tar' may create normal files instead of directories
  776. archived with the `-G' option.
  777.  
  778. The Remote Tape Server
  779. **********************
  780.  
  781.    In order to access the tape drive on a remote machine, `tar' uses
  782. the remote tape server written at the University of California at
  783. Berkeley.  The remote tape server must be installed as `/etc/rmt' on
  784. any machine whose tape drive you want to use.  `tar' calls `/etc/rmt'
  785. by running an `rsh' or `remsh' to the remote machine, optionally using
  786. a different login name if one is supplied.
  787.  
  788.    A copy of the source for the remote tape server is provided.  It is
  789. Copyright (C) 1983 by the Regents of the University of California, but
  790. can be freely distributed.  Instructions for compiling and installing
  791. it are included in the `Makefile'.
  792.  
  793.    The remote tape server may need to be modified in order to run on a
  794. non-4.3BSD system.
  795.  
  796. The Format of a `tar' Archive
  797. *****************************
  798.  
  799.    This chapter is based heavily on John Gilmore's tar(5) manual page
  800. for the public domain `tar' that GNU `tar' is based on.
  801.  
  802. The Standard Format
  803. ===================
  804.  
  805.    A "tar tape" or file contains a series of records.  Each record
  806. contains `RECORDSIZE' bytes.  Although this format may be thought of as
  807. being on magnetic tape, other media are often used.
  808.  
  809.    Each file archived is represented by a header record which describes
  810. the file, followed by zero or more records which give the contents of
  811. the file.  At the end of the archive file there may be a record filled
  812. with binary zeros as an end-of-file marker.  A reasonable system should
  813. write a record of zeros at the end, but must not assume that such a
  814. record exists when reading an archive.
  815.  
  816.    The records may be "blocked" for physical I/O operations.  Each
  817. block of N records (where N is set by the `-b' option to `tar') is
  818. written with a single `write()' operation.  On magnetic tapes, the
  819. result of such a write is a single tape record.  When writing an
  820. archive, the last block of records should be written at the full size,
  821. with records after the zero record containing all zeroes.  When reading
  822. an archive, a reasonable system should properly handle an archive whose
  823. last block is shorter than the rest, or which contains garbage records
  824. after a zero record.
  825.  
  826.    The header record is defined in C as follows:
  827.  
  828.      /*
  829.       * Standard Archive Format - Standard TAR - USTAR
  830.       */
  831.      #define RECORDSIZE      512
  832.      #define NAMSIZ          100
  833.      #define TUNMLEN          32
  834.      #define TGNMLEN          32
  835.      #define SPARSE_EXT_HDR    21
  836.      #define    SPARSE_IN_HDR    4
  837.      
  838.      struct sparse {
  839.          char offset[12];
  840.          char numbytes[12];
  841.      };
  842.      
  843.      union record {
  844.          char        charptr[RECORDSIZE];
  845.          struct header {
  846.              char    name[NAMSIZ];
  847.              char    mode[8];
  848.              char    uid[8];
  849.              char    gid[8];
  850.              char    size[12];
  851.              char    mtime[12];
  852.              char    chksum[8];
  853.              char    linkflag;
  854.              char    linkname[NAMSIZ];
  855.              char    magic[8];
  856.              char    uname[TUNMLEN];
  857.              char    gname[TGNMLEN];
  858.              char    devmajor[8];
  859.              char    devminor[8];
  860.          /* these following fields were added by JF for gnu */
  861.          /* and are NOT standard */
  862.          char    atime[12];
  863.          char    ctime[12];
  864.          char    offset[12];
  865.          char    longnames[4];
  866.          /* the next three fields were added by JK to deal with
  867.              shrinking down sparse files */
  868.          struct    sparse sp[SPARSE_IN_HDR];
  869.          char    isextended;
  870.          char    ending_blanks[12];    /* number of nulls at the
  871.                             end of the file, if any */
  872.          } header;
  873.      
  874.          struct extended_header {
  875.          struct sparse sp[21];
  876.          char isextended;
  877.          } ext_hdr;
  878.      
  879.      };
  880.      
  881.      /* The checksum field is filled with this while the checksum is computed. */
  882.      #define    CHKBLANKS    "        "        /* 8 blanks, no null */
  883.      
  884.      /* The magic field is filled with this if uname and gname are valid. */
  885.      #define    TMAGIC    "ustar  "        /* 7 chars and a null */
  886.      
  887.      /* The magic field is filled with this if this is a GNU format dump entry */
  888.      #define    GNUMAGIC  "GNUtar "        /* 7 chars and a null */
  889.      
  890.      /* The linkflag defines the type of file */
  891.      #define  LF_OLDNORMAL '\0'       /* Normal disk file, Unix compatible */
  892.      #define  LF_NORMAL    '0'        /* Normal disk file */
  893.      #define  LF_LINK      '1'        /* Link to previously dumped file */
  894.      #define  LF_SYMLINK   '2'        /* Symbolic link */
  895.      #define  LF_CHR       '3'        /* Character special file */
  896.      #define  LF_BLK       '4'        /* Block special file */
  897.      #define  LF_DIR       '5'        /* Directory */
  898.      #define  LF_FIFO      '6'        /* FIFO special file */
  899.      #define  LF_CONTIG    '7'        /* Contiguous file */
  900.      
  901.      /* Further link types which were defined later. */
  902.      #define LF_DUMPDIR    'D'        /* This is a dir entry that contains
  903.                             the names of files that were in
  904.                             the dir at the time the dump
  905.                             was made */
  906.      #define LF_MULTIVOL    'M'        /* This is the continuation
  907.                             of a file that began on another
  908.                             volume */
  909.      #define LF_SPARSE    'S'        /* This is for sparse files */
  910.      #define LF_VOLHDR    'V'        /* This file is a tape/volume header */
  911.                          /* Ignore it on extraction */
  912.      
  913.      /* Bits used in the mode field - values in octal */
  914.      #define  TSUID    04000        /* Set UID on execution */
  915.      #define  TSGID    02000        /* Set GID on execution */
  916.      #define  TSVTX    01000        /* Save text (sticky bit) */
  917.      
  918.      /* File permissions */
  919.      #define  TUREAD   00400        /* read by owner */
  920.      #define  TUWRITE  00200        /* write by owner */
  921.      #define  TUEXEC   00100        /* execute/search by owner */
  922.      #define  TGREAD   00040        /* read by group */
  923.      #define  TGWRITE  00020        /* write by group */
  924.      #define  TGEXEC   00010        /* execute/search by group */
  925.      #define  TOREAD   00004        /* read by other */
  926.      #define  TOWRITE  00002        /* write by other */
  927.      #define  TOEXEC   00001        /* execute/search by other */
  928.  
  929.    All characters in header records are represented by using 8-bit
  930. characters in the local variant of ASCII.  Each field within the
  931. structure is contiguous; that is, there is no padding used within the
  932. structure.  Each character on the archive medium is stored contiguously.
  933.  
  934.    Bytes representing the contents of files (after the header record of
  935. each file) are not translated in any way and are not constrained to
  936. represent characters in any character set.  The `tar' format does not
  937. distinguish text files from binary files, and no translation of file
  938. contents is performed.
  939.  
  940.    The `name', `linkname', `magic', `uname', and `gname' are
  941. null-terminated character strings.  All other fileds are zero-filled
  942. octal numbers in ASCII.  Each numeric field of width W contains W minus
  943. 2 digits, a space, and a null, except `size', and `mtime', which do not
  944. contain the trailing null.
  945.  
  946.    The `name' field is the pathname of the file, with directory names
  947. (if any) preceding the file name, separated by slashes.
  948.  
  949.    The `mode' field provides nine bits specifying file permissions and
  950. three bits to specify the Set UID, Set GID, and Save Text ("stick")
  951. modes.  Values for these bits are defined above.  When special
  952. permissions are required to create a file with a given mode, and the
  953. user restoring files from the archive does not hold such permissions,
  954. the mode bit(s) specifying those special permissions are ignored.
  955. Modes which are not supported by the operating system restoring files
  956. from the archive will be ignored.  Unsupported modes should be faked up
  957. when creating or updating an archive; e.g. the group permission could
  958. be copied from the `other' permission.
  959.  
  960.    The `uid' and `gid' fields are the numeric user and group ID of the
  961. file owners, respectively.  If the operating system does not support
  962. numeric user or group IDs, these fields should be ignored.
  963.  
  964.    The `size' field is the size of the file in bytes; linked files are
  965. archived with this field specified as zero.  *Note Extraction
  966. Options::; in particular the `-G' option.
  967.  
  968.    The `mtime' field is the modification time of the file at the time
  969. it was archived.  It is the ASCII representation of the octal value of
  970. the last time the file was modified, represented as an integer number
  971. of seconds since January 1, 1970, 00:00 Coordinated Universal Time.
  972.  
  973.    The `chksum' field is the ASCII representation of the octal value of
  974. the simple sum of all bytes in the header record.  Each 8-bit byte in
  975. the header is added to an unsigned integer, initialized to zero, the
  976. precision of which shall be no less than seventeen bits.  When
  977. calculating the checksum, the `chksum' field is treated as if it were
  978. all blanks.
  979.  
  980.    The `typeflag' field specifies the type of file archived.  If a
  981. particular implementation does not recognize or permit the specified
  982. type, the file will be extracted as if it were a regular file.  As this
  983. action occurs, `tar' issues a warning to the standard error.
  984.  
  985.    The `atime' and `ctime' fields are used in making incremental
  986. backups; they store, respectively, the particular file's access time and
  987. last inode-change time.
  988.  
  989.    The `offset' is used by the -M option, when making a multi-volume
  990. archive.  The offset is number of bytes into the file that we need to
  991. restart at to continue the file on the next tape, i.e., where we store
  992. the location that a continued file is continued at.
  993.  
  994.    The `longnames' field of the header belongs with something that is
  995. not yet implemented in tar, and is therefore empty.
  996.  
  997.    The following fields were added to deal with sparse files.  A file is
  998. "sparse" if it takes in unallocated blocks which end up being
  999. represented as zeros, i.e., no useful data.  A test to see if a file is
  1000. sparse is to look at the number blocks allocated for it versus the
  1001. number of characters in the file; if there are fewer blocks allocated
  1002. for the file than would normally be allocated for a file of that size,
  1003. then the file is sparse.  This is the method tar uses to detect a
  1004. sparse file, and once such a file is detected, it is treated
  1005. differently from non-sparse files.
  1006.  
  1007.    Sparse files are often dbm files, or other database-type files which
  1008. have data at some points and emptiness in the greater part of the file.
  1009. Such files can appear to be very large when an `ls -l' is done on them,
  1010. when in truth, there may be a very small amount of important data
  1011. contained in the file.  It is thus undesirable to have tar think that it
  1012. must back up this entire file, as great quantities of room are wasted on
  1013. empty blocks, which can lead to running out of room on a tape far
  1014. earlier than is necessary.  Thus, sparse files are dealt with so that
  1015. these empty blocks are not written to the tape.  Instead, what is
  1016. written to the tape is a description, of sorts, of the sparse file:
  1017. where the holes are, how big the holes are, and how much data is found
  1018. at the end of the hole.  This way, the file takes up potentially far
  1019. less room on the tape, and when the file is extracted later on, it will
  1020. look exactly the way it looked beforehand.  The following is a
  1021. description of the fields used to handle a sparse file:
  1022.  
  1023.    The `sp' is an array of `struct sparse'.  Each `struct sparse'
  1024. contains two 12-character strings which represent an offset into the
  1025. file and a number of bytes to be written at that offset.  The offset is
  1026. absolute, and not relative to the offset in preceding array element.
  1027.  
  1028.    The header can hold four of these `struct sparse' at the moment; if
  1029. more are needed, they are not stored in the header.
  1030.  
  1031.    The `isextended' flag is set when an `extended_header' is needed to
  1032. deal with a file.  Note that this means that this flag can only be set
  1033. when dealing with a sparse file, and it is only set in the event that
  1034. the description of the file will not fit in the alloted room for sparse
  1035. structures in the header.  In other words, an extended_header is needed.
  1036.  
  1037.    The `extended_header' structure is used for sparse files which need
  1038. more sparse structures than can fit in the header.  The header can fit
  1039. 4 such structures; if more are needed, the flag `isextended' gets set
  1040. and the next record is an `extended_header'.
  1041.  
  1042.    Each `extended_header' structure contains an array of 21 sparse
  1043. structures, along with a similar `isextended' flag that the header had.
  1044. There can be an indeterminate number of such `extended_header's to
  1045. describe a sparse file.
  1046.  
  1047. `LF_NORMAL'
  1048. `LF_OLDNORMAL'
  1049.      These flags represent a regular file.  In order to be compatible
  1050.      with older versions of `tar', a `typeflag' value of `LF_OLDNORMAL'
  1051.      should be silently recognized as a regular file.  New archives
  1052.      should be created using `LF_NORMAL'.  Also, for backward
  1053.      compatibility, `tar' treats a regular file whose name ends with a
  1054.      slash as a directory.
  1055.  
  1056. `LF_LINK'
  1057.      This flag represents a file linked to another file, of any type,
  1058.      previously archived.  Such files are identified in Unix by each
  1059.      file having the same device and inode number.  The linked-to name
  1060.      is specified in the `linkname' field with a trailing null.
  1061.  
  1062. `LF_SYMLINK'
  1063.      This represents a symbolic link to another file.  The linked-to
  1064.      name is specified in the `linkname' field with a trailing null.
  1065.  
  1066. `LF_CHR'
  1067. `LF_BLK'
  1068.      These represent character special files and block special files
  1069.      respectively.  In this case the `devmajor' and `devminor' fields
  1070.      will contain the major and minor device numbers respectively.
  1071.      Operating systems may map the device specifications to their own
  1072.      local specification, or may ignore the entry.
  1073.  
  1074. `LF_DIR'
  1075.      This flag specifies a directory or sub-directory.  The directory
  1076.      name in the `name' field should end with a slash.  On systems where
  1077.      disk allocation is performed on a directory basis, the `size'
  1078.      field will contain the maximum number of bytes (which may be
  1079.      rounded to the nearest disk block allocation unit) which the
  1080.      directory may hold.  A `size' field of zero indicates no such
  1081.      limiting.  Systems which do not support limiting in this manner
  1082.      should ignore the `size' field.
  1083.  
  1084. `LF_FIFO'
  1085.      This specifies a FIFO special file.  Note that the archiving of a
  1086.      FIFO file archives the existence of this file and not its contents.
  1087.  
  1088. `LF_CONTIG'
  1089.      This specifies a contiguous file, which is the same as a normal
  1090.      file except that, in operating systems which support it, all its
  1091.      space is allocated contiguously on the disk.  Operating systems
  1092.      which do not allow contiguous allocation should silently treat
  1093.      this type as a normal file.
  1094.  
  1095. `'A' ...'
  1096. `'Z''
  1097.      These are reserved for custom implementations.  Some of these are
  1098.      used in the GNU modified format, as described below.
  1099.  
  1100.    Other values are reserved for specification in future revisions of
  1101. the P1003 standard, and should not be used by any `tar' program.
  1102.  
  1103.    The `magic' field indicates that this archive was output in the
  1104. P1003 archive format.  If this field contains `TMAGIC', the `uname' and
  1105. `gname' fields will contain the ASCII representation of the owner and
  1106. group of the file respectively.  If found, the user and group ID
  1107. represented by these names will be used rather than the values within
  1108. the `uid' and `gid' fields.
  1109.  
  1110. GNU Extensions to the Archive Format
  1111. ====================================
  1112.  
  1113.    The GNU format uses additional file types to describe new types of
  1114. files in an archive.  These are listed below.
  1115.  
  1116. `LF_DUMPDIR'
  1117. `'D''
  1118.      This represents a directory and a list of files created by the
  1119.      `-G' option.  The `size' field gives the total size of the
  1120.      associated list of files.  Each filename is preceded by either a
  1121.      `'Y'' (the file should be in this archive) or an `'N'' (The file
  1122.      is a directory, or is not stored in the archive).  Each filename is
  1123.      terminated by a null.  There is an additional null after the last
  1124.      filename.
  1125.  
  1126. `LF_MULTIVOL'
  1127. `'M''
  1128.      This represents a file continued from another volume of a
  1129.      multi-volume archive created with the `-M' option.  The original
  1130.      type of the file is not given here.  The `size' field gives the
  1131.      maximum size of this piece of the file (assuming the volume does
  1132.      not end before the file is written out).  The `offset' field gives
  1133.      the offset from the beginning of the file where this part of the
  1134.      file begins.  Thus `size' plus `offset' should equal the original
  1135.      size of the file.
  1136.  
  1137. `LF_SPARSE'
  1138. `'S''
  1139.      This flag indicates that we are dealing with a sparse file.  Note
  1140.      that archiving a sparse file requires special operations to find
  1141.      holes in the file, which mark the positions of these holes, along
  1142.      with the number of bytes of data to be found after the hole.
  1143.  
  1144. `LF_VOLHDR'
  1145. `'V''
  1146.      This file type is used to mark the volume header that was given
  1147.      with the `-V' option when the archive was created.  The `name'
  1148.      field contains the `name' given after the `-V' option.  The `size'
  1149.      field is zero.  Only the first file in each volume of an archive
  1150.      should have this type.
  1151.  
  1152.    You may have trouble reading a GNU format archive on a non-GNU
  1153. system if the options `-G', `-M', `-S', or `-V' were used when writing
  1154. the archive.  In general, if tar does not use the GNU-added fields of
  1155. the header, other versions of tar should be able to read the archive.
  1156. Otherwise, the tar program will give an error, the most likely one
  1157. being a checksum error.
  1158.  
  1159. Concept Index
  1160. *************
  1161.  
  1162. * Menu:
  1163.