source: trunk/essentials/app-arch/tar/doc/tar.info-2

Last change on this file was 3342, checked in by bird, 18 years ago

tar 1.16.1

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