1 This is tar.info, produced by makeinfo version 4.13 from tar.texi.
3 This manual is for GNU `tar' (version 1.23, 9 March 2010), which
4 creates and extracts files from archives.
6 Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003,
7 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
9 Permission is granted to copy, distribute and/or modify this
10 document under the terms of the GNU Free Documentation License,
11 Version 1.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".
17 (a) The FSF's Back-Cover Text is: "You have the freedom to copy
18 and modify this GNU manual. Buying copies from the FSF supports
19 it in developing GNU and promoting software freedom."
21 INFO-DIR-SECTION Archiving
23 * Tar: (tar). Making tape (or disk) archives.
26 INFO-DIR-SECTION Individual utilities
28 * tar: (tar)tar invocation. Invoking GNU `tar'.
32 File: tar.info, Node: Formats, Next: Media, Prev: Date input formats, Up: Top
34 8 Controlling the Archive Format
35 ********************************
37 Due to historical reasons, there are several formats of tar archives.
38 All of them are based on the same principles, but have some subtle
39 differences that often make them incompatible with each other.
41 GNU tar is able to create and handle archives in a variety of
42 formats. The most frequently used formats are (in alphabetical order):
45 Format used by GNU `tar' versions up to 1.13.25. This format
46 derived from an early POSIX standard, adding some improvements
47 such as sparse file handling and incremental archives.
48 Unfortunately these features were implemented in a way
49 incompatible with other archive formats.
51 Archives in `gnu' format are able to hold file names of unlimited
55 Format used by GNU `tar' of versions prior to 1.12.
58 Archive format, compatible with the V7 implementation of tar. This
59 format imposes a number of limitations. The most important of them
62 1. The maximum length of a file name is limited to 99 characters.
64 2. The maximum length of a symbolic link is limited to 99
67 3. It is impossible to store special files (block and character
70 4. Maximum value of user or group ID is limited to 2097151
73 5. V7 archives do not contain symbolic ownership information
74 (user and group name of the file owner).
76 This format has traditionally been used by Automake when producing
77 Makefiles. This practice will change in the future, in the
78 meantime, however this means that projects containing file names
79 more than 99 characters long will not be able to use GNU `tar'
80 1.23 and Automake prior to 1.9.
83 Archive format defined by POSIX.1-1988 specification. It stores
84 symbolic ownership information. It is also able to store special
85 files. However, it imposes several restrictions as well:
87 1. The maximum length of a file name is limited to 256
88 characters, provided that the file name can be split at a
89 directory separator in two parts, first of them being at most
90 155 bytes long. So, in most cases the maximum file name
91 length will be shorter than 256 characters.
93 2. The maximum length of a symbolic link name is limited to 100
96 3. Maximum size of a file the archive is able to accommodate is
99 4. Maximum value of UID/GID is 2097151.
101 5. Maximum number of bits in device major and minor numbers is
105 Format used by Jo"rg Schilling `star' implementation. GNU `tar'
106 is able to read `star' archives but currently does not produce
110 Archive format defined by POSIX.1-2001 specification. This is the
111 most flexible and feature-rich format. It does not impose any
112 restrictions on file sizes or file name lengths. This format is
113 quite recent, so not all tar implementations are able to handle it
114 properly. However, this format is designed in such a way that any
115 tar implementation able to read `ustar' archives will be able to
116 read most `posix' archives as well, with the only exception that
117 any additional information (such as long file names etc.) will in
118 such case be extracted as plain text files along with the files it
121 This archive format will be the default format for future versions
125 The following table summarizes the limitations of each of these
128 Format UID File Size File Name Devn
129 --------------------------------------------------------------------
130 gnu 1.8e19 Unlimited Unlimited 63
131 oldgnu 1.8e19 Unlimited Unlimited 63
132 v7 2097151 8GB 99 n/a
133 ustar 2097151 8GB 256 21
134 posix Unlimited Unlimited Unlimited Unlimited
136 The default format for GNU `tar' is defined at compilation time.
137 You may check it by running `tar --help', and examining the last lines
138 of its output. Usually, GNU `tar' is configured to create archives in
139 `gnu' format, however, future version will switch to `posix'.
143 * Compression:: Using Less Space through Compression
144 * Attributes:: Handling File Attributes
145 * Portability:: Making `tar' Archives More Portable
146 * cpio:: Comparison of `tar' and `cpio'
149 File: tar.info, Node: Compression, Next: Attributes, Up: Formats
151 8.1 Using Less Space through Compression
152 ========================================
156 * gzip:: Creating and Reading Compressed Archives
157 * sparse:: Archiving Sparse Files
160 File: tar.info, Node: gzip, Next: sparse, Up: Compression
162 8.1.1 Creating and Reading Compressed Archives
163 ----------------------------------------------
165 GNU `tar' is able to create and read compressed archives. It supports
166 a wide variety of compression programs, namely: `gzip', `bzip2',
167 `lzip', `lzma', `lzop', `xz' and traditional `compress'. The latter is
168 supported mostly for backward compatibility, and we recommend against
169 using it, because it is by far less effective than the other
170 compression programs(1).
172 Creating a compressed archive is simple: you just specify a
173 "compression option" along with the usual archive creation commands.
174 The compression option is `-z' (`--gzip') to create a `gzip' compressed
175 archive, `-j' (`--bzip2') to create a `bzip2' compressed archive,
176 `--lzip' to create an lzip compressed archive, `-J' (`--xz') to create
177 an XZ archive, `--lzma' to create an LZMA compressed archive, `--lzop'
178 to create an LSOP archive, and `-Z' (`--compress') to use `compress'
179 program. For example:
181 $ tar cfz archive.tar.gz .
183 You can also let GNU `tar' select the compression program basing on
184 the suffix of the archive file name. This is done using
185 `--auto-compress' (`-a') command line option. For example, the
186 following invocation will use `bzip2' for compression:
188 $ tar cfa archive.tar.bz2 .
190 whereas the following one will use `lzma':
192 $ tar cfa archive.tar.lzma .
194 For a complete list of file name suffixes recognized by GNU `tar',
195 *note auto-compress::.
197 Reading compressed archive is even simpler: you don't need to specify
198 any additional options as GNU `tar' recognizes its format
199 automatically. Thus, the following commands will list and extract the
200 archive created in previous example:
202 # List the compressed archive
203 $ tar tf archive.tar.gz
204 # Extract the compressed archive
205 $ tar xf archive.tar.gz
207 The format recognition algorithm is based on "signatures", a special
208 byte sequences in the beginning of file, that are specific for certain
209 compression formats. If this approach fails, `tar' falls back to using
210 archive name suffix to determine its format (*Note auto-compress::, for
211 a list of recognized suffixes).
213 The only case when you have to specify a decompression option while
214 reading the archive is when reading from a pipe or from a tape drive
215 that does not support random access. However, in this case GNU `tar'
216 will indicate which option you should use. For example:
218 $ cat archive.tar.gz | tar tf -
219 tar: Archive is compressed. Use -z option
220 tar: Error is not recoverable: exiting now
222 If you see such diagnostics, just add the suggested option to the
223 invocation of GNU `tar':
225 $ cat archive.tar.gz | tar tfz -
227 Notice also, that there are several restrictions on operations on
228 compressed archives. First of all, compressed archives cannot be
229 modified, i.e., you cannot update (`--update', alias `-u') them or
230 delete (`--delete') members from them or add (`--append', alias `-r')
231 members to them. Likewise, you cannot append another `tar' archive to
232 a compressed archive using `--concatenate' (`-A'). Secondly,
233 multi-volume archives cannot be compressed.
235 The following table summarizes compression options used by GNU `tar'.
239 Select a compression program to use by the archive file name
240 suffix. The following suffixes are recognized:
242 Suffix Compression program
243 --------------------------------------------------------------
262 Filter the archive through `gzip'.
264 You can use `--gzip' and `--gunzip' on physical devices (tape
265 drives, etc.) and remote files as well as on normal files; data to
266 or from such devices or remote files is reblocked by another copy
267 of the `tar' program to enforce the specified (or default) record
268 size. The default compression parameters are used; if you need to
269 override them, set `GZIP' environment variable, e.g.:
271 $ GZIP=--best tar cfz archive.tar.gz subdir
273 Another way would be to avoid the `--gzip' (`--gunzip',
274 `--ungzip', `-z') option and run `gzip' explicitly:
276 $ tar cf - subdir | gzip --best -c - > archive.tar.gz
278 About corrupted compressed archives: `gzip''ed files have no
279 redundancy, for maximum compression. The adaptive nature of the
280 compression scheme means that the compression tables are implicitly
281 spread all over the archive. If you lose a few blocks, the dynamic
282 construction of the compression tables becomes unsynchronized, and
283 there is little chance that you could recover later in the archive.
285 There are pending suggestions for having a per-volume or per-file
286 compression in GNU `tar'. This would allow for viewing the
287 contents without decompression, and for resynchronizing
288 decompression at every volume or file, in case of corrupted
289 archives. Doing so, we might lose some compressibility. But this
290 would have make recovering easier. So, there are pros and cons.
295 Filter the archive through `xz'. Otherwise like `--gzip'.
299 Filter the archive through `bzip2'. Otherwise like `--gzip'.
302 Filter the archive through `lzip'. Otherwise like `--gzip'.
305 Filter the archive through `lzma'. Otherwise like `--gzip'.
308 Filter the archive through `lzop'. Otherwise like `--gzip'.
313 Filter the archive through `compress'. Otherwise like `--gzip'.
315 `--use-compress-program=PROG'
317 Use external compression program PROG. Use this option if you are
318 not happy with the compression program associated with the suffix
319 at compile time or if you have a compression program that GNU `tar'
320 does not support. There are two requirements to which PROG should
323 First, when called without options, it should read data from
324 standard input, compress it and output it on standard output.
326 Secondly, if called with `-d' argument, it should do exactly the
327 opposite, i.e., read the compressed data from the standard input
328 and produce uncompressed data on the standard output.
330 The `--use-compress-program' option, in particular, lets you
331 implement your own filters, not necessarily dealing with
332 compression/decompression. For example, suppose you wish to implement
333 PGP encryption on top of compression, using `gpg' (*note gpg:
334 (gpg)Top.). The following script does that:
338 -d) gpg --decrypt - | gzip -d -c;;
339 '') gzip -c | gpg -s;;
340 *) echo "Unknown option $1">&2; exit 1;;
343 Suppose you name it `gpgz' and save it somewhere in your `PATH'.
344 Then the following command will create a compressed archive signed with
347 $ tar -cf foo.tar.gpgz -Igpgz .
349 Likewise, the command below will list its contents:
351 $ tar -tf foo.tar.gpgz -Igpgz .
353 ---------- Footnotes ----------
355 (1) It also had patent problems in the past.
358 File: tar.info, Node: sparse, Prev: gzip, Up: Compression
360 8.1.2 Archiving Sparse Files
361 ----------------------------
363 Files in the file system occasionally have "holes". A "hole" in a file
364 is a section of the file's contents which was never written. The
365 contents of a hole reads as all zeros. On many operating systems,
366 actual disk storage is not allocated for holes, but they are counted in
367 the length of the file. If you archive such a file, `tar' could create
368 an archive longer than the original. To have `tar' attempt to
369 recognize the holes in a file, use `--sparse' (`-S'). When you use
370 this option, then, for any file using less disk space than would be
371 expected from its length, `tar' searches the file for consecutive
372 stretches of zeros. It then records in the archive for the file where
373 the consecutive stretches of zeros are, and only archives the "real
374 contents" of the file. On extraction (using `--sparse' is not needed
375 on extraction) any such files have holes created wherever the
376 continuous stretches of zeros were found. Thus, if you use `--sparse',
377 `tar' archives won't take more space than the original.
381 This option instructs `tar' to test each file for sparseness
382 before attempting to archive it. If the file is found to be
383 sparse it is treated specially, thus allowing to decrease the
384 amount of space used by its image in the archive.
386 This option is meaningful only when creating or updating archives.
387 It has no effect on extraction.
389 Consider using `--sparse' when performing file system backups, to
390 avoid archiving the expanded forms of files stored sparsely in the
393 Even if your system has no sparse files currently, some may be
394 created in the future. If you use `--sparse' while making file system
395 backups as a matter of course, you can be assured the archive will
396 never take more space on the media than the files take on disk
397 (otherwise, archiving a disk filled with sparse files might take
398 hundreds of tapes). *Note Incremental Dumps::.
400 However, be aware that `--sparse' option presents a serious
401 drawback. Namely, in order to determine if the file is sparse `tar'
402 has to read it before trying to archive it, so in total the file is
403 read *twice*. So, always bear in mind that the time needed to process
404 all files with this option is roughly twice the time needed to archive
407 When using `POSIX' archive format, GNU `tar' is able to store sparse
408 files using in three distinct ways, called "sparse formats". A sparse
409 format is identified by its "number", consisting, as usual of two
410 decimal numbers, delimited by a dot. By default, format `1.0' is used.
411 If, for some reason, you wish to use an earlier format, you can select
412 it using `--sparse-version' option.
414 `--sparse-version=VERSION'
415 Select the format to store sparse files in. Valid VERSION values
416 are: `0.0', `0.1' and `1.0'. *Note Sparse Formats::, for a
417 detailed description of each format.
419 Using `--sparse-format' option implies `--sparse'.
422 File: tar.info, Node: Attributes, Next: Portability, Prev: Compression, Up: Formats
424 8.2 Handling File Attributes
425 ============================
427 When `tar' reads files, it updates their access times. To avoid this,
428 use the `--atime-preserve[=METHOD]' option, which can either reset the
429 access time retroactively or avoid changing it in the first place.
432 `--atime-preserve=replace'
433 `--atime-preserve=system'
434 Preserve the access times of files that are read. This works only
435 for files that you own, unless you have superuser privileges.
437 `--atime-preserve=replace' works on most systems, but it also
438 restores the data modification time and updates the status change
439 time. Hence it doesn't interact with incremental dumps nicely
440 (*note Incremental Dumps::), and it can set access or data
441 modification times incorrectly if other programs access the file
442 while `tar' is running.
444 `--atime-preserve=system' avoids changing the access time in the
445 first place, if the operating system supports this.
446 Unfortunately, this may or may not work on any given operating
447 system or file system. If `tar' knows for sure it won't work, it
448 complains right away.
450 Currently `--atime-preserve' with no operand defaults to
451 `--atime-preserve=replace', but this is intended to change to
452 `--atime-preserve=system' when the latter is better-supported.
456 Do not extract data modification time.
458 When this option is used, `tar' leaves the data modification times
459 of the files it extracts as the times when the files were
460 extracted, instead of setting it to the times recorded in the
463 This option is meaningless with `--list' (`-t').
466 Create extracted files with the same ownership they have in the
469 This is the default behavior for the superuser, so this option is
470 meaningful only for non-root users, when `tar' is executed on
471 those systems able to give files away. This is considered as a
472 security flaw by many people, at least because it makes quite
473 difficult to correctly account users for the disk space they
474 occupy. Also, the `suid' or `sgid' attributes of files are easily
475 and silently lost when files are given away.
477 When writing an archive, `tar' writes the user ID and user name
478 separately. If it can't find a user name (because the user ID is
479 not in `/etc/passwd'), then it does not write one. When restoring,
480 it tries to look the name (if one was written) up in
481 `/etc/passwd'. If it fails, then it uses the user ID stored in
486 Do not attempt to restore ownership when extracting. This is the
487 default behavior for ordinary users, so this option has an effect
488 only for the superuser.
491 The `--numeric-owner' option allows (ANSI) archives to be written
492 without user/group name information or such information to be
493 ignored when extracting. It effectively disables the generation
494 and/or use of user/group name information. This option forces
495 extraction using the numeric ids from the archive, ignoring the
498 This is useful in certain circumstances, when restoring a backup
499 from an emergency floppy with different passwd/group files for
500 example. It is otherwise impossible to extract files with the
501 right ownerships if the password file in use during the extraction
502 does not match the one belonging to the file system(s) being
503 extracted. This occurs, for example, if you are restoring your
504 files after a major crash and had booted from an emergency floppy
505 with no password file or put your disk into another machine to do
508 The numeric ids are _always_ saved into `tar' archives. The
509 identifying names are added at create time when provided by the
510 system, unless `--format=oldgnu' is used. Numeric ids could be
511 used when moving archives between a collection of machines using a
512 centralized management for attribution of numeric ids to users and
513 groups. This is often made through using the NIS capabilities.
515 When making a `tar' file for distribution to other sites, it is
516 sometimes cleaner to use a single owner for all files in the
517 distribution, and nicer to specify the write permission bits of the
518 files as stored in the archive independently of their actual value
519 on the file system. The way to prepare a clean distribution is
520 usually to have some Makefile rule creating a directory, copying
521 all needed files in that directory, then setting ownership and
522 permissions as wanted (there are a lot of possible schemes), and
523 only then making a `tar' archive out of this directory, before
524 cleaning everything out. Of course, we could add a lot of options
525 to GNU `tar' for fine tuning permissions and ownership. This is
526 not the good way, I think. GNU `tar' is already crowded with
527 options and moreover, the approach just explained gives you a
528 great deal of control already.
532 `--preserve-permissions'
533 Extract all protection information.
535 This option causes `tar' to set the modes (access permissions) of
536 extracted files exactly as recorded in the archive. If this option
537 is not used, the current `umask' setting limits the permissions on
538 extracted files. This option is by default enabled when `tar' is
539 executed by a superuser.
541 This option is meaningless with `--list' (`-t').
544 Same as both `--same-permissions' and `--same-order'.
546 This option is deprecated, and will be removed in GNU `tar'
551 File: tar.info, Node: Portability, Next: cpio, Prev: Attributes, Up: Formats
553 8.3 Making `tar' Archives More Portable
554 =======================================
556 Creating a `tar' archive on a particular system that is meant to be
557 useful later on many other machines and with other versions of `tar' is
558 more challenging than you might think. `tar' archive formats have been
559 evolving since the first versions of Unix. Many such formats are
560 around, and are not always compatible with each other. This section
561 discusses a few problems, and gives some advice about making `tar'
562 archives more portable.
564 One golden rule is simplicity. For example, limit your `tar'
565 archives to contain only regular files and directories, avoiding other
566 kind of special files. Do not attempt to save sparse files or
567 contiguous files as such. Let's discuss a few more problems, in turn.
571 * Portable Names:: Portable Names
572 * dereference:: Symbolic Links
573 * hard links:: Hard Links
574 * old:: Old V7 Archives
575 * ustar:: Ustar Archives
576 * gnu:: GNU and old GNU format archives.
577 * posix:: POSIX archives
578 * Checksumming:: Checksumming Problems
579 * Large or Negative Values:: Large files, negative time stamps, etc.
580 * Other Tars:: How to Extract GNU-Specific Data Using
581 Other `tar' Implementations
584 File: tar.info, Node: Portable Names, Next: dereference, Up: Portability
589 Use portable file and member names. A name is portable if it contains
590 only ASCII letters and digits, `/', `.', `_', and `-'; it cannot be
591 empty, start with `-' or `//', or contain `/-'. Avoid deep directory
592 nesting. For portability to old Unix hosts, limit your file name
593 components to 14 characters or less.
595 If you intend to have your `tar' archives to be read under MSDOS,
596 you should not rely on case distinction for file names, and you might
597 use the GNU `doschk' program for helping you further diagnosing illegal
598 MSDOS names, which are even more limited than System V's.
601 File: tar.info, Node: dereference, Next: hard links, Prev: Portable Names, Up: Portability
606 Normally, when `tar' archives a symbolic link, it writes a block to the
607 archive naming the target of the link. In that way, the `tar' archive
608 is a faithful record of the file system contents. `--dereference'
609 (`-h') is used with `--create' (`-c'), and causes `tar' to archive the
610 files symbolic links point to, instead of the links themselves. When
611 this option is used, when `tar' encounters a symbolic link, it will
612 archive the linked-to file, instead of simply recording the presence of
615 The name under which the file is stored in the file system is not
616 recorded in the archive. To record both the symbolic link name and the
617 file name in the system, archive the file under both names. If all
618 links were recorded automatically by `tar', an extracted file might be
619 linked to a file name that no longer exists in the file system.
621 If a linked-to file is encountered again by `tar' while creating the
622 same archive, an entire second copy of it will be stored. (This
623 _might_ be considered a bug.)
625 So, for portable archives, do not archive symbolic links as such,
626 and use `--dereference' (`-h'): many systems do not support symbolic
627 links, and moreover, your distribution might be unusable if it contains
628 unresolved symbolic links.
631 File: tar.info, Node: hard links, Next: old, Prev: dereference, Up: Portability
636 Normally, when `tar' archives a hard link, it writes a block to the
637 archive naming the target of the link (a `1' type block). In that way,
638 the actual file contents is stored in file only once. For example,
639 consider the following two files:
642 -rw-r--r-- 2 gray staff 4 2007-10-30 15:11 one
643 -rw-r--r-- 2 gray staff 4 2007-10-30 15:11 jeden
645 Here, `jeden' is a link to `one'. When archiving this directory
646 with a verbose level 2, you will get an output similar to the following:
648 $ tar cfvv ../archive.tar .
649 drwxr-xr-x gray/staff 0 2007-10-30 15:13 ./
650 -rw-r--r-- gray/staff 4 2007-10-30 15:11 ./jeden
651 hrw-r--r-- gray/staff 0 2007-10-30 15:11 ./one link to ./jeden
653 The last line shows that, instead of storing two copies of the file,
654 `tar' stored it only once, under the name `jeden', and stored file
655 `one' as a hard link to this file.
657 It may be important to know that all hard links to the given file are
658 stored in the archive. For example, this may be necessary for exact
659 reproduction of the file system. The following option does that:
663 Check the number of links dumped for each processed file. If this
664 number does not match the total number of hard links for the file,
665 print a warning message.
667 For example, trying to archive only file `jeden' with this option
668 produces the following diagnostics:
670 $ tar -c -f ../archive.tar -l jeden
671 tar: Missing links to `jeden'.
673 Although creating special records for hard links helps keep a
674 faithful record of the file system contents and makes archives more
675 compact, it may present some difficulties when extracting individual
676 members from the archive. For example, trying to extract file `one'
677 from the archive created in previous examples produces, in the absense
680 $ tar xf archive.tar ./one
681 tar: ./one: Cannot hard link to `./jeden': No such file or directory
682 tar: Error exit delayed from previous errors
684 The reason for this behavior is that `tar' cannot seek back in the
685 archive to the previous member (in this case, `one'), to extract it(1).
686 If you wish to avoid such problems at the cost of a bigger archive, use
687 the following option:
690 Dereference hard links and store the files they refer to.
692 For example, trying this option on our two sample files, we get two
693 copies in the archive, each of which can then be extracted
694 independently of the other:
696 $ tar -c -vv -f ../archive.tar --hard-dereference .
697 drwxr-xr-x gray/staff 0 2007-10-30 15:13 ./
698 -rw-r--r-- gray/staff 4 2007-10-30 15:11 ./jeden
699 -rw-r--r-- gray/staff 4 2007-10-30 15:11 ./one
701 ---------- Footnotes ----------
703 (1) There are plans to fix this in future releases.
706 File: tar.info, Node: old, Next: ustar, Prev: hard links, Up: Portability
708 8.3.4 Old V7 Archives
709 ---------------------
711 Certain old versions of `tar' cannot handle additional information
712 recorded by newer `tar' programs. To create an archive in V7 format
713 (not ANSI), which can be read by these old versions, specify the
714 `--format=v7' option in conjunction with the `--create' (`-c') (`tar'
715 also accepts `--portability' or `--old-archive' for this option). When
716 you specify it, `tar' leaves out information about directories, pipes,
717 fifos, contiguous files, and device files, and specifies file ownership
718 by group and user IDs instead of group and user names.
720 When updating an archive, do not use `--format=v7' unless the
721 archive was created using this option.
723 In most cases, a _new_ format archive can be read by an _old_ `tar'
724 program without serious trouble, so this option should seldom be
725 needed. On the other hand, most modern `tar's are able to read old
726 format archives, so it might be safer for you to always use
727 `--format=v7' for your distributions. Notice, however, that `ustar'
728 format is a better alternative, as it is free from many of `v7''s
732 File: tar.info, Node: ustar, Next: gnu, Prev: old, Up: Portability
734 8.3.5 Ustar Archive Format
735 --------------------------
737 Archive format defined by POSIX.1-1988 specification is called `ustar'.
738 Although it is more flexible than the V7 format, it still has many
739 restrictions (*Note ustar: Formats, for the detailed description of
740 `ustar' format). Along with V7 format, `ustar' format is a good choice
741 for archives intended to be read with other implementations of `tar'.
743 To create archive in `ustar' format, use `--format=ustar' option in
744 conjunction with the `--create' (`-c').
747 File: tar.info, Node: gnu, Next: posix, Prev: ustar, Up: Portability
749 8.3.6 GNU and old GNU `tar' format
750 ----------------------------------
752 GNU `tar' was based on an early draft of the POSIX 1003.1 `ustar'
753 standard. GNU extensions to `tar', such as the support for file names
754 longer than 100 characters, use portions of the `tar' header record
755 which were specified in that POSIX draft as unused. Subsequent changes
756 in POSIX have allocated the same parts of the header record for other
757 purposes. As a result, GNU `tar' format is incompatible with the
758 current POSIX specification, and with `tar' programs that follow it.
760 In the majority of cases, `tar' will be configured to create this
761 format by default. This will change in future releases, since we plan
762 to make `POSIX' format the default.
764 To force creation a GNU `tar' archive, use option `--format=gnu'.
767 File: tar.info, Node: posix, Next: Checksumming, Prev: gnu, Up: Portability
769 8.3.7 GNU `tar' and POSIX `tar'
770 -------------------------------
772 Starting from version 1.14 GNU `tar' features full support for
773 POSIX.1-2001 archives.
775 A POSIX conformant archive will be created if `tar' was given
776 `--format=posix' (`--format=pax') option. No special option is
777 required to read and extract from a POSIX archive.
781 * PAX keywords:: Controlling Extended Header Keywords.
784 File: tar.info, Node: PAX keywords, Up: posix
786 8.3.7.1 Controlling Extended Header Keywords
787 ............................................
789 `--pax-option=KEYWORD-LIST'
790 Handle keywords in PAX extended headers. This option is
791 equivalent to `-o' option of the `pax' utility.
793 KEYWORD-LIST is a comma-separated list of keyword options, each
794 keyword option taking one of the following forms:
797 When used with one of archive-creation commands, this option
798 instructs `tar' to omit from extended header records that it
799 produces any keywords matching the string PATTERN.
801 When used in extract or list mode, this option instructs tar to
802 ignore any keywords matching the given PATTERN in the extended
803 header records. In both cases, matching is performed using the
804 pattern matching notation described in POSIX 1003.2, 3.13 (*note
805 wildcards::). For example:
807 --pax-option delete=security.*
809 would suppress security-related information.
812 This keyword allows user control over the name that is written
813 into the ustar header blocks for the extended headers. The name
814 is obtained from STRING after making the following substitutions:
816 Meta-character Replaced By
817 --------------------------------------------------------
818 %d The directory name of the file,
819 equivalent to the result of the
820 `dirname' utility on the translated
822 %f The name of the file with the
823 directory information stripped,
824 equivalent to the result of the
825 `basename' utility on the translated
827 %p The process ID of the `tar' process.
830 Any other `%' characters in STRING produce undefined results.
832 If no option `exthdr.name=string' is specified, `tar' will use the
833 following default value:
838 This keyword defines the value of the `mtime' field that is
839 written into the ustar header blocks for the extended headers. By
840 default, the `mtime' field is set to the modification time of the
841 archive member described by that extended headers.
843 `globexthdr.name=STRING'
844 This keyword allows user control over the name that is written into
845 the ustar header blocks for global extended header records. The
846 name is obtained from the contents of STRING, after making the
847 following substitutions:
849 Meta-character Replaced By
850 --------------------------------------------------------
851 %n An integer that represents the
852 sequence number of the global
853 extended header record in the
854 archive, starting at 1.
855 %p The process ID of the `tar' process.
858 Any other `%' characters in STRING produce undefined results.
860 If no option `globexthdr.name=string' is specified, `tar' will use
861 the following default value:
863 $TMPDIR/GlobalHead.%p.%n
865 where `$TMPDIR' represents the value of the TMPDIR environment
866 variable. If TMPDIR is not set, `tar' uses `/tmp'.
868 `globexthdr.mtime=VALUE'
869 This keyword defines the value of the `mtime' field that is
870 written into the ustar header blocks for the global extended
871 headers. By default, the `mtime' field is set to the time when
875 When used with one of archive-creation commands, these
876 keyword/value pairs will be included at the beginning of the
877 archive in a global extended header record. When used with one of
878 archive-reading commands, `tar' will behave as if it has
879 encountered these keyword/value pairs at the beginning of the
880 archive in a global extended header record.
883 When used with one of archive-creation commands, these
884 keyword/value pairs will be included as records at the beginning
885 of an extended header for each file. This is effectively
886 equivalent to KEYWORD=VALUE form except that it creates no global
887 extended header records.
889 When used with one of archive-reading commands, `tar' will behave
890 as if these keyword/value pairs were included as records at the
891 end of each extended header; thus, they will override any global or
892 file-specific extended header record keywords of the same names.
893 For example, in the command:
895 tar --format=posix --create \
896 --file archive --pax-option gname:=user .
898 the group name will be forced to a new value for all files stored
901 In any of the forms described above, the VALUE may be a string
902 enclosed in curly braces. In that case, the string between the braces
903 is understood either as a textual time representation, as described in
904 *note Date input formats::, or a name of the existing file, starting
905 with `/' or `.'. In the latter case, the modification time of that
908 For example, to set all modification times to the current date, you
909 use the following option:
911 --pax-option='mtime:={now}'
913 Note quoting of the option's argument.
915 As another example, here is the option that ensures that any two
916 archives created using it, will be binary equivalent if they have the
919 --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0
922 File: tar.info, Node: Checksumming, Next: Large or Negative Values, Prev: posix, Up: Portability
924 8.3.8 Checksumming Problems
925 ---------------------------
927 SunOS and HP-UX `tar' fail to accept archives created using GNU `tar'
928 and containing non-ASCII file names, that is, file names having
929 characters with the eight bit set, because they use signed checksums,
930 while GNU `tar' uses unsigned checksums while creating archives, as per
931 POSIX standards. On reading, GNU `tar' computes both checksums and
932 accepts any. It is somewhat worrying that a lot of people may go
933 around doing backup of their files using faulty (or at least
934 non-standard) software, not learning about it until it's time to
935 restore their missing files with an incompatible file extractor, or
938 GNU `tar' computes checksums both ways, and accept any on read, so
939 GNU tar can read Sun tapes even with their wrong checksums. GNU `tar'
940 produces the standard checksum, however, raising incompatibilities with
941 Sun. That is to say, GNU `tar' has not been modified to _produce_
942 incorrect archives to be read by buggy `tar''s. I've been told that
943 more recent Sun `tar' now read standard archives, so maybe Sun did a
944 similar patch, after all?
946 The story seems to be that when Sun first imported `tar' sources on
947 their system, they recompiled it without realizing that the checksums
948 were computed differently, because of a change in the default signing
949 of `char''s in their compiler. So they started computing checksums
950 wrongly. When they later realized their mistake, they merely decided
951 to stay compatible with it, and with themselves afterwards.
952 Presumably, but I do not really know, HP-UX has chosen that their `tar'
953 archives to be compatible with Sun's. The current standards do not
954 favor Sun `tar' format. In any case, it now falls on the shoulders of
955 SunOS and HP-UX users to get a `tar' able to read the good archives
959 File: tar.info, Node: Large or Negative Values, Next: Other Tars, Prev: Checksumming, Up: Portability
961 8.3.9 Large or Negative Values
962 ------------------------------
964 _(This message will disappear, once this node revised.)_
966 The above sections suggest to use `oldest possible' archive format if
967 in doubt. However, sometimes it is not possible. If you attempt to
968 archive a file whose metadata cannot be represented using required
969 format, GNU `tar' will print error message and ignore such a file. You
970 will than have to switch to a format that is able to handle such
971 values. The format summary table (*note Formats::) will help you to do
974 In particular, when trying to archive files larger than 8GB or with
975 timestamps not in the range 1970-01-01 00:00:00 through 2242-03-16
976 12:56:31 UTC, you will have to chose between GNU and POSIX archive
977 formats. When considering which format to choose, bear in mind that
978 the GNU format uses two's-complement base-256 notation to store values
979 that do not fit into standard ustar range. Such archives can generally
980 be read only by a GNU `tar' implementation. Moreover, they sometimes
981 cannot be correctly restored on another hosts even by GNU `tar'. For
982 example, using two's complement representation for negative time stamps
983 that assumes a signed 32-bit `time_t' generates archives that are not
984 portable to hosts with differing `time_t' representations.
986 On the other hand, POSIX archives, generally speaking, can be
987 extracted by any tar implementation that understands older ustar
988 format. The only exception are files larger than 8GB.
991 File: tar.info, Node: Other Tars, Prev: Large or Negative Values, Up: Portability
993 8.3.10 How to Extract GNU-Specific Data Using Other `tar' Implementations
994 -------------------------------------------------------------------------
996 In previous sections you became acquainted with various quirks
997 necessary to make your archives portable. Sometimes you may need to
998 extract archives containing GNU-specific members using some third-party
999 `tar' implementation or an older version of GNU `tar'. Of course your
1000 best bet is to have GNU `tar' installed, but if it is for some reason
1001 impossible, this section will explain how to cope without it.
1003 When we speak about "GNU-specific" members we mean two classes of
1004 them: members split between the volumes of a multi-volume archive and
1005 sparse members. You will be able to always recover such members if the
1006 archive is in PAX format. In addition split members can be recovered
1007 from archives in old GNU format. The following subsections describe
1008 the required procedures in detail.
1012 * Split Recovery:: Members Split Between Volumes
1013 * Sparse Recovery:: Sparse Members
1016 File: tar.info, Node: Split Recovery, Next: Sparse Recovery, Up: Other Tars
1018 8.3.10.1 Extracting Members Split Between Volumes
1019 .................................................
1021 If a member is split between several volumes of an old GNU format
1022 archive most third party `tar' implementation will fail to extract it.
1023 To extract it, use `tarcat' program (*note Tarcat::). This program is
1024 available from GNU `tar' home page
1025 (http://www.gnu.org/software/tar/utils/tarcat.html). It concatenates
1026 several archive volumes into a single valid archive. For example, if
1027 you have three volumes named from `vol-1.tar' to `vol-3.tar', you can
1028 do the following to extract them using a third-party `tar':
1030 $ tarcat vol-1.tar vol-2.tar vol-3.tar | tar xf -
1032 You could use this approach for most (although not all) PAX format
1033 archives as well. However, extracting split members from a PAX archive
1034 is a much easier task, because PAX volumes are constructed in such a
1035 way that each part of a split member is extracted to a different file
1036 by `tar' implementations that are not aware of GNU extensions. More
1037 specifically, the very first part retains its original name, and all
1038 subsequent parts are named using the pattern:
1040 %d/GNUFileParts.%p/%f.%n
1042 where symbols preceeded by `%' are "macro characters" that have the
1045 Meta-character Replaced By
1046 ------------------------------------------------------------
1047 %d The directory name of the file,
1048 equivalent to the result of the
1049 `dirname' utility on its full name.
1050 %f The file name of the file, equivalent
1051 to the result of the `basename' utility
1053 %p The process ID of the `tar' process that
1054 created the archive.
1055 %n Ordinal number of this particular part.
1057 For example, if the file `var/longfile' was split during archive
1058 creation between three volumes, and the creator `tar' process had
1059 process ID `27962', then the member names will be:
1062 var/GNUFileParts.27962/longfile.1
1063 var/GNUFileParts.27962/longfile.2
1065 When you extract your archive using a third-party `tar', these files
1066 will be created on your disk, and the only thing you will need to do to
1067 restore your file in its original form is concatenate them in the
1068 proper order, for example:
1071 $ cat GNUFileParts.27962/longfile.1 \
1072 GNUFileParts.27962/longfile.2 >> longfile
1073 $ rm -f GNUFileParts.27962
1075 Notice, that if the `tar' implementation you use supports PAX format
1076 archives, it will probably emit warnings about unknown keywords during
1077 extraction. They will look like this:
1080 Unknown extended header keyword 'GNU.volume.filename' ignored.
1081 Unknown extended header keyword 'GNU.volume.size' ignored.
1082 Unknown extended header keyword 'GNU.volume.offset' ignored.
1084 You can safely ignore these warnings.
1086 If your `tar' implementation is not PAX-aware, you will get more
1087 warnings and more files generated on your disk, e.g.:
1090 var/PaxHeaders.27962/longfile: Unknown file type 'x', extracted as
1092 Unexpected EOF in archive
1094 tmp/GlobalHead.27962.1: Unknown file type 'g', extracted as normal file
1095 GNUFileParts.27962/PaxHeaders.27962/sparsefile.1: Unknown file type
1096 'x', extracted as normal file
1098 Ignore these warnings. The `PaxHeaders.*' directories created will
1099 contain files with "extended header keywords" describing the extracted
1100 files. You can delete them, unless they describe sparse members. Read
1101 further to learn more about them.
1104 File: tar.info, Node: Sparse Recovery, Prev: Split Recovery, Up: Other Tars
1106 8.3.10.2 Extracting Sparse Members
1107 ..................................
1109 Any `tar' implementation will be able to extract sparse members from a
1110 PAX archive. However, the extracted files will be "condensed", i.e.,
1111 any zero blocks will be removed from them. When we restore such a
1112 condensed file to its original form, by adding zero blocks (or "holes")
1113 back to their original locations, we call this process "expanding" a
1114 compressed sparse file.
1116 To expand a file, you will need a simple auxiliary program called
1117 `xsparse'. It is available in source form from GNU `tar' home page
1118 (http://www.gnu.org/software/tar/utils/xsparse.html).
1120 Let's begin with archive members in "sparse format version 1.0"(1),
1121 which are the easiest to expand. The condensed file will contain both
1122 file map and file data, so no additional data will be needed to restore
1123 it. If the original file name was `DIR/NAME', then the condensed file
1124 will be named `DIR/GNUSparseFile.N/NAME', where N is a decimal
1127 To expand a version 1.0 file, run `xsparse' as follows:
1129 $ xsparse `cond-file'
1131 where `cond-file' is the name of the condensed file. The utility will
1132 deduce the name for the resulting expanded file using the following
1135 1. If `cond-file' does not contain any directories, `../cond-file'
1138 2. If `cond-file' has the form `DIR/T/NAME', where both T and NAME
1139 are simple names, with no `/' characters in them, the output file
1140 name will be `DIR/NAME'.
1142 3. Otherwise, if `cond-file' has the form `DIR/NAME', the output file
1143 name will be `NAME'.
1145 In the unlikely case when this algorithm does not suit your needs,
1146 you can explicitly specify output file name as a second argument to the
1149 $ xsparse `cond-file' `out-file'
1151 It is often a good idea to run `xsparse' in "dry run" mode first.
1152 In this mode, the command does not actually expand the file, but
1153 verbosely lists all actions it would be taking to do so. The dry run
1154 mode is enabled by `-n' command line argument:
1156 $ xsparse -n /home/gray/GNUSparseFile.6058/sparsefile
1157 Reading v.1.0 sparse map
1158 Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1159 `/home/gray/sparsefile'
1162 To actually expand the file, you would run:
1164 $ xsparse /home/gray/GNUSparseFile.6058/sparsefile
1166 The program behaves the same way all UNIX utilities do: it will keep
1167 quiet unless it has simething important to tell you (e.g. an error
1168 condition or something). If you wish it to produce verbose output,
1169 similar to that from the dry run mode, use `-v' option:
1171 $ xsparse -v /home/gray/GNUSparseFile.6058/sparsefile
1172 Reading v.1.0 sparse map
1173 Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1174 `/home/gray/sparsefile'
1177 Additionally, if your `tar' implementation has extracted the
1178 "extended headers" for this file, you can instruct `xstar' to use them
1179 in order to verify the integrity of the expanded file. The option `-x'
1180 sets the name of the extended header file to use. Continuing our
1183 $ xsparse -v -x /home/gray/PaxHeaders.6058/sparsefile \
1184 /home/gray/GNUSparseFile.6058/sparsefile
1185 Reading extended header file
1186 Found variable GNU.sparse.major = 1
1187 Found variable GNU.sparse.minor = 0
1188 Found variable GNU.sparse.name = sparsefile
1189 Found variable GNU.sparse.realsize = 217481216
1190 Reading v.1.0 sparse map
1191 Expanding file `/home/gray/GNUSparseFile.6058/sparsefile' to
1192 `/home/gray/sparsefile'
1195 An "extended header" is a special `tar' archive header that precedes
1196 an archive member and contains a set of "variables", describing the
1197 member properties that cannot be stored in the standard `ustar' header.
1198 While optional for expanding sparse version 1.0 members, the use of
1199 extended headers is mandatory when expanding sparse members in older
1200 sparse formats: v.0.0 and v.0.1 (The sparse formats are described in
1201 detail in *note Sparse Formats::.) So, for these formats, the question
1202 is: how to obtain extended headers from the archive?
1204 If you use a `tar' implementation that does not support PAX format,
1205 extended headers for each member will be extracted as a separate file.
1206 If we represent the member name as `DIR/NAME', then the extended header
1207 file will be named `DIR/PaxHeaders.N/NAME', where N is an integer
1210 Things become more difficult if your `tar' implementation does
1211 support PAX headers, because in this case you will have to manually
1212 extract the headers. We recommend the following algorithm:
1214 1. Consult the documentation of your `tar' implementation for an
1215 option that prints "block numbers" along with the archive listing
1216 (analogous to GNU `tar''s `-R' option). For example, `star' has
1219 2. Obtain verbose listing using the `block number' option, and find
1220 block numbers of the sparse member in question and the member
1221 immediately following it. For example, running `star' on our
1224 $ star -t -v -block-number -f arc.tar
1226 star: Unknown extended header keyword 'GNU.sparse.size' ignored.
1227 star: Unknown extended header keyword 'GNU.sparse.numblocks' ignored.
1228 star: Unknown extended header keyword 'GNU.sparse.name' ignored.
1229 star: Unknown extended header keyword 'GNU.sparse.map' ignored.
1230 block 56: 425984 -rw-r--r-- gray/users Jun 25 14:46 2006 GNUSparseFile.28124/sparsefile
1231 block 897: 65391 -rw-r--r-- gray/users Jun 24 20:06 2006 README
1234 (as usual, ignore the warnings about unknown keywords.)
1236 3. Let SIZE be the size of the sparse member, BS be its block number
1237 and BN be the block number of the next member. Compute:
1239 N = BS - BN - SIZE/512 - 2
1241 This number gives the size of the extended header part in tar
1242 "blocks". In our example, this formula gives: `897 - 56 - 425984
1245 4. Use `dd' to extract the headers:
1247 dd if=ARCHIVE of=HNAME bs=512 skip=BS count=N
1249 where ARCHIVE is the archive name, HNAME is a name of the file to
1250 store the extended header in, BS and N are computed in previous
1253 In our example, this command will be
1255 $ dd if=arc.tar of=xhdr bs=512 skip=56 count=7
1257 Finally, you can expand the condensed file, using the obtained
1260 $ xsparse -v -x xhdr GNUSparseFile.6058/sparsefile
1261 Reading extended header file
1262 Found variable GNU.sparse.size = 217481216
1263 Found variable GNU.sparse.numblocks = 208
1264 Found variable GNU.sparse.name = sparsefile
1265 Found variable GNU.sparse.map = 0,2048,1050624,2048,...
1266 Expanding file `GNUSparseFile.28124/sparsefile' to `sparsefile'
1269 ---------- Footnotes ----------
1273 (2) technically speaking, N is a "process ID" of the `tar' process
1274 which created the archive (*note PAX keywords::).
1277 File: tar.info, Node: cpio, Prev: Portability, Up: Formats
1279 8.4 Comparison of `tar' and `cpio'
1280 ==================================
1282 _(This message will disappear, once this node revised.)_
1284 The `cpio' archive formats, like `tar', do have maximum file name
1285 lengths. The binary and old ASCII formats have a maximum file length
1286 of 256, and the new ASCII and CRC ASCII formats have a max file length
1287 of 1024. GNU `cpio' can read and write archives with arbitrary file
1288 name lengths, but other `cpio' implementations may crash unexplainedly
1289 trying to read them.
1291 `tar' handles symbolic links in the form in which it comes in BSD;
1292 `cpio' doesn't handle symbolic links in the form in which it comes in
1293 System V prior to SVR4, and some vendors may have added symlinks to
1294 their system without enhancing `cpio' to know about them. Others may
1295 have enhanced it in a way other than the way I did it at Sun, and which
1296 was adopted by AT&T (and which is, I think, also present in the `cpio'
1297 that Berkeley picked up from AT&T and put into a later BSD release--I
1298 think I gave them my changes).
1300 (SVR4 does some funny stuff with `tar'; basically, its `cpio' can
1301 handle `tar' format input, and write it on output, and it probably
1302 handles symbolic links. They may not have bothered doing anything to
1303 enhance `tar' as a result.)
1305 `cpio' handles special files; traditional `tar' doesn't.
1307 `tar' comes with V7, System III, System V, and BSD source; `cpio'
1308 comes only with System III, System V, and later BSD (4.3-tahoe and
1311 `tar''s way of handling multiple hard links to a file can handle
1312 file systems that support 32-bit i-numbers (e.g., the BSD file system);
1313 `cpio's way requires you to play some games (in its "binary" format,
1314 i-numbers are only 16 bits, and in its "portable ASCII" format, they're
1315 18 bits--it would have to play games with the "file system ID" field of
1316 the header to make sure that the file system ID/i-number pairs of
1317 different files were always different), and I don't know which `cpio's,
1318 if any, play those games. Those that don't might get confused and
1319 think two files are the same file when they're not, and make hard links
1322 `tar's way of handling multiple hard links to a file places only one
1323 copy of the link on the tape, but the name attached to that copy is the
1324 _only_ one you can use to retrieve the file; `cpio's way puts one copy
1325 for every link, but you can retrieve it using any of the names.
1327 What type of check sum (if any) is used, and how is this
1330 See the attached manual pages for `tar' and `cpio' format. `tar'
1331 uses a checksum which is the sum of all the bytes in the `tar' header
1332 for a file; `cpio' uses no checksum.
1334 If anyone knows why `cpio' was made when `tar' was present at the
1337 It wasn't. `cpio' first showed up in PWB/UNIX 1.0; no
1338 generally-available version of UNIX had `tar' at the time. I don't
1339 know whether any version that was generally available _within AT&T_ had
1340 `tar', or, if so, whether the people within AT&T who did `cpio' knew
1343 On restore, if there is a corruption on a tape `tar' will stop at
1344 that point, while `cpio' will skip over it and try to restore the rest
1347 The main difference is just in the command syntax and header format.
1349 `tar' is a little more tape-oriented in that everything is blocked
1350 to start on a record boundary.
1352 Is there any differences between the ability to recover crashed
1353 archives between the two of them. (Is there any chance of
1354 recovering crashed archives at all.)
1356 Theoretically it should be easier under `tar' since the blocking
1357 lets you find a header with some variation of `dd skip=NN'. However,
1358 modern `cpio''s and variations have an option to just search for the
1359 next file header after an error with a reasonable chance of resyncing.
1360 However, lots of tape driver software won't allow you to continue past
1361 a media error which should be the only reason for getting out of sync
1362 unless a file changed sizes while you were writing the archive.
1364 If anyone knows why `cpio' was made when `tar' was present at the
1365 unix scene, please tell me about this too.
1367 Probably because it is more media efficient (by not blocking
1368 everything and using only the space needed for the headers where `tar'
1369 always uses 512 bytes per file header) and it knows how to archive
1372 You might want to look at the freely available alternatives. The
1373 major ones are `afio', GNU `tar', and `pax', each of which have their
1374 own extensions with some backwards compatibility.
1376 Sparse files were `tar'red as sparse files (which you can easily
1377 test, because the resulting archive gets smaller, and GNU `cpio' can no
1381 File: tar.info, Node: Media, Next: Changes, Prev: Formats, Up: Top
1383 9 Tapes and Other Archive Media
1384 *******************************
1386 _(This message will disappear, once this node revised.)_
1388 A few special cases about tape handling warrant more detailed
1389 description. These special cases are discussed below.
1391 Many complexities surround the use of `tar' on tape drives. Since
1392 the creation and manipulation of archives located on magnetic tape was
1393 the original purpose of `tar', it contains many features making such
1394 manipulation easier.
1396 Archives are usually written on dismountable media--tape cartridges,
1397 mag tapes, or floppy disks.
1399 The amount of data a tape or disk holds depends not only on its size,
1400 but also on how it is formatted. A 2400 foot long reel of mag tape
1401 holds 40 megabytes of data when formatted at 1600 bits per inch. The
1402 physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
1404 Magnetic media are re-usable--once the archive on a tape is no longer
1405 needed, the archive can be erased and the tape or disk used over.
1406 Media quality does deteriorate with use, however. Most tapes or disks
1407 should be discarded when they begin to produce data errors. EXABYTE
1408 tape cartridges should be discarded when they generate an "error count"
1409 (number of non-usable bits) of more than 10k.
1411 Magnetic media are written and erased using magnetic fields, and
1412 should be protected from such fields to avoid damage to stored data.
1413 Sticking a floppy disk to a filing cabinet using a magnet is probably
1418 * Device:: Device selection and switching
1419 * Remote Tape Server::
1420 * Common Problems and Solutions::
1421 * Blocking:: Blocking
1422 * Many:: Many archives on one tape
1423 * Using Multiple Tapes:: Using Multiple Tapes
1424 * label:: Including a Label in the Archive
1426 * Write Protection::
1429 File: tar.info, Node: Device, Next: Remote Tape Server, Up: Media
1431 9.1 Device Selection and Switching
1432 ==================================
1434 _(This message will disappear, once this node revised.)_
1436 `-f [HOSTNAME:]FILE'
1437 `--file=[HOSTNAME:]FILE'
1438 Use archive file or device FILE on HOSTNAME.
1440 This option is used to specify the file name of the archive `tar'
1443 If the file name is `-', `tar' reads the archive from standard input
1444 (when listing or extracting), or writes it to standard output (when
1445 creating). If the `-' file name is given when updating an archive,
1446 `tar' will read the original archive from its standard input, and will
1447 write the entire new archive to its standard output.
1449 If the file name contains a `:', it is interpreted as `hostname:file
1450 name'. If the HOSTNAME contains an "at" sign (`@'), it is treated as
1451 `user@hostname:file name'. In either case, `tar' will invoke the
1452 command `rsh' (or `remsh') to start up an `/usr/libexec/rmt' on the
1453 remote machine. If you give an alternate login name, it will be given
1454 to the `rsh'. Naturally, the remote machine must have an executable
1455 `/usr/libexec/rmt'. This program is free software from the University
1456 of California, and a copy of the source code can be found with the
1457 sources for `tar'; it's compiled and installed by default. The exact
1458 path to this utility is determined when configuring the package. It is
1459 `PREFIX/libexec/rmt', where PREFIX stands for your installation prefix.
1460 This location may also be overridden at runtime by using the
1461 `--rmt-command=COMMAND' option (*Note --rmt-command: Option Summary,
1462 for detailed description of this option. *Note Remote Tape Server::,
1463 for the description of `rmt' command).
1465 If this option is not given, but the environment variable `TAPE' is
1466 set, its value is used; otherwise, old versions of `tar' used a default
1467 archive name (which was picked when `tar' was compiled). The default
1468 is normally set up to be the "first" tape drive or other transportable
1469 I/O medium on the system.
1471 Starting with version 1.11.5, GNU `tar' uses standard input and
1472 standard output as the default device, and I will not try anymore
1473 supporting automatic device detection at installation time. This was
1474 failing really in too many cases, it was hopeless. This is now
1475 completely left to the installer to override standard input and
1476 standard output for default device, if this seems preferable. Further,
1477 I think _most_ actual usages of `tar' are done with pipes or disks, not
1478 really tapes, cartridges or diskettes.
1480 Some users think that using standard input and output is running
1481 after trouble. This could lead to a nasty surprise on your screen if
1482 you forget to specify an output file name--especially if you are going
1483 through a network or terminal server capable of buffering large amounts
1484 of output. We had so many bug reports in that area of configuring
1485 default tapes automatically, and so many contradicting requests, that
1486 we finally consider the problem to be portably intractable. We could
1487 of course use something like `/dev/tape' as a default, but this is
1488 _also_ running after various kind of trouble, going from hung processes
1489 to accidental destruction of real tapes. After having seen all this
1490 mess, using standard input and output as a default really sounds like
1491 the only clean choice left, and a very useful one too.
1493 GNU `tar' reads and writes archive in records, I suspect this is the
1494 main reason why block devices are preferred over character devices.
1495 Most probably, block devices are more efficient too. The installer
1496 could also check for `DEFTAPE' in `<sys/mtio.h>'.
1499 Archive file is local even if it contains a colon.
1501 `--rsh-command=COMMAND'
1502 Use remote COMMAND instead of `rsh'. This option exists so that
1503 people who use something other than the standard `rsh' (e.g., a
1504 Kerberized `rsh') can access a remote device.
1506 When this command is not used, the shell command found when the
1507 `tar' program was installed is used instead. This is the first
1508 found of `/usr/ucb/rsh', `/usr/bin/remsh', `/usr/bin/rsh',
1509 `/usr/bsd/rsh' or `/usr/bin/nsh'. The installer may have
1510 overridden this by defining the environment variable `RSH' _at
1514 Specify drive and density.
1518 Create/list/extract multi-volume archive.
1520 This option causes `tar' to write a "multi-volume" archive--one
1521 that may be larger than will fit on the medium used to hold it.
1522 *Note Multi-Volume Archives::.
1526 Change tape after writing NUM x 1024 bytes.
1528 This option might be useful when your tape drivers do not properly
1529 detect end of physical tapes. By being slightly conservative on
1530 the maximum tape length, you might avoid the problem entirely.
1533 `--info-script=FILE'
1534 `--new-volume-script=FILE'
1535 Execute `file' at end of each tape. This implies `--multi-volume'
1536 (`-M'). *Note info-script::, for a detailed description of this
1540 File: tar.info, Node: Remote Tape Server, Next: Common Problems and Solutions, Prev: Device, Up: Media
1542 9.2 Remote Tape Server
1543 ======================
1545 In order to access the tape drive on a remote machine, `tar' uses the
1546 remote tape server written at the University of California at Berkeley.
1547 The remote tape server must be installed as `PREFIX/libexec/rmt' on any
1548 machine whose tape drive you want to use. `tar' calls `rmt' by running
1549 an `rsh' or `remsh' to the remote machine, optionally using a different
1550 login name if one is supplied.
1552 A copy of the source for the remote tape server is provided. It is
1553 Copyright (C) 1983 by the Regents of the University of California, but
1554 can be freely distributed. It is compiled and installed by default.
1556 Unless you use the `--absolute-names' (`-P') option, GNU `tar' will
1557 not allow you to create an archive that contains absolute file names (a
1558 file name beginning with `/'.) If you try, `tar' will automatically
1559 remove the leading `/' from the file names it stores in the archive.
1560 It will also type a warning message telling you what it is doing.
1562 When reading an archive that was created with a different `tar'
1563 program, GNU `tar' automatically extracts entries in the archive which
1564 have absolute file names as if the file names were not absolute. This
1565 is an important feature. A visitor here once gave a `tar' tape to an
1566 operator to restore; the operator used Sun `tar' instead of GNU `tar',
1567 and the result was that it replaced large portions of our `/bin' and
1568 friends with versions from the tape; needless to say, we were unhappy
1569 about having to recover the file system from backup tapes.
1571 For example, if the archive contained a file `/usr/bin/computoy',
1572 GNU `tar' would extract the file to `usr/bin/computoy', relative to the
1573 current directory. If you want to extract the files in an archive to
1574 the same absolute names that they had when the archive was created, you
1575 should do a `cd /' before extracting the files from the archive, or you
1576 should either use the `--absolute-names' option, or use the command
1579 Some versions of Unix (Ultrix 3.1 is known to have this problem),
1580 can claim that a short write near the end of a tape succeeded, when it
1581 actually failed. This will result in the -M option not working
1582 correctly. The best workaround at the moment is to use a significantly
1583 larger blocking factor than the default 20.
1585 In order to update an archive, `tar' must be able to backspace the
1586 archive in order to reread or rewrite a record that was just read (or
1587 written). This is currently possible only on two kinds of files: normal
1588 disk files (or any other file that can be backspaced with `lseek'), and
1589 industry-standard 9-track magnetic tape (or any other kind of tape that
1590 can be backspaced with the `MTIOCTOP' `ioctl').
1592 This means that the `--append', `--concatenate', and `--delete'
1593 commands will not work on any other kind of file. Some media simply
1594 cannot be backspaced, which means these commands and options will never
1595 be able to work on them. These non-backspacing media include pipes and
1596 cartridge tape drives.
1598 Some other media can be backspaced, and `tar' will work on them once
1599 `tar' is modified to do so.
1601 Archives created with the `--multi-volume', `--label', and
1602 `--incremental' (`-G') options may not be readable by other version of
1603 `tar'. In particular, restoring a file that was split over a volume
1604 boundary will require some careful work with `dd', if it can be done at
1605 all. Other versions of `tar' may also create an empty file whose name
1606 is that of the volume header. Some versions of `tar' may create normal
1607 files instead of directories archived with the `--incremental' (`-G')
1611 File: tar.info, Node: Common Problems and Solutions, Next: Blocking, Prev: Remote Tape Server, Up: Media
1613 9.3 Some Common Problems and their Solutions
1614 ============================================
1618 no such file or directory
1622 directory checksum error
1625 errors from media/system:
1630 File: tar.info, Node: Blocking, Next: Many, Prev: Common Problems and Solutions, Up: Media
1635 "Block" and "record" terminology is rather confused, and it is also
1636 confusing to the expert reader. On the other hand, readers who are new
1637 to the field have a fresh mind, and they may safely skip the next two
1638 paragraphs, as the remainder of this manual uses those two terms in a
1639 quite consistent way.
1641 John Gilmore, the writer of the public domain `tar' from which GNU
1642 `tar' was originally derived, wrote (June 1995):
1644 The nomenclature of tape drives comes from IBM, where I believe
1645 they were invented for the IBM 650 or so. On IBM mainframes, what
1646 is recorded on tape are tape blocks. The logical organization of
1647 data is into records. There are various ways of putting records
1648 into blocks, including `F' (fixed sized records), `V' (variable
1649 sized records), `FB' (fixed blocked: fixed size records, N to a
1650 block), `VB' (variable size records, N to a block), `VSB'
1651 (variable spanned blocked: variable sized records that can occupy
1652 more than one block), etc. The `JCL' `DD RECFORM=' parameter
1653 specified this to the operating system.
1655 The Unix man page on `tar' was totally confused about this. When
1656 I wrote `PD TAR', I used the historically correct terminology
1657 (`tar' writes data records, which are grouped into blocks). It
1658 appears that the bogus terminology made it into POSIX (no surprise
1659 here), and now Franc,ois has migrated that terminology back into
1660 the source code too.
1662 The term "physical block" means the basic transfer chunk from or to
1663 a device, after which reading or writing may stop without anything
1664 being lost. In this manual, the term "block" usually refers to a disk
1665 physical block, _assuming_ that each disk block is 512 bytes in length.
1666 It is true that some disk devices have different physical blocks, but
1667 `tar' ignore these differences in its own format, which is meant to be
1668 portable, so a `tar' block is always 512 bytes in length, and "block"
1669 always mean a `tar' block. The term "logical block" often represents
1670 the basic chunk of allocation of many disk blocks as a single entity,
1671 which the operating system treats somewhat atomically; this concept is
1672 only barely used in GNU `tar'.
1674 The term "physical record" is another way to speak of a physical
1675 block, those two terms are somewhat interchangeable. In this manual,
1676 the term "record" usually refers to a tape physical block, _assuming_
1677 that the `tar' archive is kept on magnetic tape. It is true that
1678 archives may be put on disk or used with pipes, but nevertheless, `tar'
1679 tries to read and write the archive one "record" at a time, whatever
1680 the medium in use. One record is made up of an integral number of
1681 blocks, and this operation of putting many disk blocks into a single
1682 tape block is called "reblocking", or more simply, "blocking". The
1683 term "logical record" refers to the logical organization of many
1684 characters into something meaningful to the application. The term
1685 "unit record" describes a small set of characters which are transmitted
1686 whole to or by the application, and often refers to a line of text.
1687 Those two last terms are unrelated to what we call a "record" in GNU
1690 When writing to tapes, `tar' writes the contents of the archive in
1691 chunks known as "records". To change the default blocking factor, use
1692 the `--blocking-factor=512-SIZE' (`-b 512-SIZE') option. Each record
1693 will then be composed of 512-SIZE blocks. (Each `tar' block is 512
1694 bytes. *Note Standard::.) Each file written to the archive uses at
1695 least one full record. As a result, using a larger record size can
1696 result in more wasted space for small files. On the other hand, a
1697 larger record size can often be read and written much more efficiently.
1699 Further complicating the problem is that some tape drives ignore the
1700 blocking entirely. For these, a larger record size can still improve
1701 performance (because the software layers above the tape drive still
1702 honor the blocking), but not as dramatically as on tape drives that
1705 When reading an archive, `tar' can usually figure out the record
1706 size on itself. When this is the case, and a non-standard record size
1707 was used when the archive was created, `tar' will print a message about
1708 a non-standard blocking factor, and then operate normally. On some
1709 tape devices, however, `tar' cannot figure out the record size itself.
1710 On most of those, you can specify a blocking factor (with
1711 `--blocking-factor') larger than the actual blocking factor, and then
1712 use the `--read-full-records' (`-B') option. (If you specify a
1713 blocking factor with `--blocking-factor' and don't use the
1714 `--read-full-records' option, then `tar' will not attempt to figure out
1715 the recording size itself.) On some devices, you must always specify
1716 the record size exactly with `--blocking-factor' when reading, because
1717 `tar' cannot figure it out. In any case, use `--list' (`-t') before
1718 doing any extractions to see whether `tar' is reading the archive
1721 `tar' blocks are all fixed size (512 bytes), and its scheme for
1722 putting them into records is to put a whole number of them (one or
1723 more) into each record. `tar' records are all the same size; at the
1724 end of the file there's a block containing all zeros, which is how you
1725 tell that the remainder of the last record(s) are garbage.
1727 In a standard `tar' file (no options), the block size is 512 and the
1728 record size is 10240, for a blocking factor of 20. What the
1729 `--blocking-factor' option does is sets the blocking factor, changing
1730 the record size while leaving the block size at 512 bytes. 20 was fine
1731 for ancient 800 or 1600 bpi reel-to-reel tape drives; most tape drives
1732 these days prefer much bigger records in order to stream and not waste
1733 tape. When writing tapes for myself, some tend to use a factor of the
1734 order of 2048, say, giving a record size of around one megabyte.
1736 If you use a blocking factor larger than 20, older `tar' programs
1737 might not be able to read the archive, so we recommend this as a limit
1738 to use in practice. GNU `tar', however, will support arbitrarily large
1739 record sizes, limited only by the amount of virtual memory or the
1740 physical characteristics of the tape device.
1744 * Format Variations:: Format Variations
1745 * Blocking Factor:: The Blocking Factor of an Archive
1748 File: tar.info, Node: Format Variations, Next: Blocking Factor, Up: Blocking
1750 9.4.1 Format Variations
1751 -----------------------
1753 _(This message will disappear, once this node revised.)_
1755 Format parameters specify how an archive is written on the archive
1756 media. The best choice of format parameters will vary depending on the
1757 type and number of files being archived, and on the media used to store
1760 To specify format parameters when accessing or creating an archive,
1761 you can use the options described in the following sections. If you do
1762 not specify any format parameters, `tar' uses default parameters. You
1763 cannot modify a compressed archive. If you create an archive with the
1764 `--blocking-factor' option specified (*note Blocking Factor::), you
1765 must specify that blocking-factor when operating on the archive. *Note
1766 Formats::, for other examples of format parameter considerations.
1769 File: tar.info, Node: Blocking Factor, Prev: Format Variations, Up: Blocking
1771 9.4.2 The Blocking Factor of an Archive
1772 ---------------------------------------
1774 _(This message will disappear, once this node revised.)_
1776 The data in an archive is grouped into blocks, which are 512 bytes.
1777 Blocks are read and written in whole number multiples called "records".
1778 The number of blocks in a record (i.e., the size of a record in units
1779 of 512 bytes) is called the "blocking factor". The
1780 `--blocking-factor=512-SIZE' (`-b 512-SIZE') option specifies the
1781 blocking factor of an archive. The default blocking factor is
1782 typically 20 (i.e., 10240 bytes), but can be specified at installation.
1783 To find out the blocking factor of an existing archive, use `tar --list
1784 --file=ARCHIVE-NAME'. This may not work on some devices.
1786 Records are separated by gaps, which waste space on the archive
1787 media. If you are archiving on magnetic tape, using a larger blocking
1788 factor (and therefore larger records) provides faster throughput and
1789 allows you to fit more data on a tape (because there are fewer gaps).
1790 If you are archiving on cartridge, a very large blocking factor (say
1791 126 or more) greatly increases performance. A smaller blocking factor,
1792 on the other hand, may be useful when archiving small files, to avoid
1793 archiving lots of nulls as `tar' fills out the archive to the end of
1794 the record. In general, the ideal record size depends on the size of
1795 the inter-record gaps on the tape you are using, and the average size
1796 of the files you are archiving. *Note create::, for information on
1799 Archives with blocking factors larger than 20 cannot be read by very
1800 old versions of `tar', or by some newer versions of `tar' running on
1801 old machines with small address spaces. With GNU `tar', the blocking
1802 factor of an archive is limited only by the maximum record size of the
1803 device containing the archive, or by the amount of available virtual
1806 Also, on some systems, not using adequate blocking factors, as
1807 sometimes imposed by the device drivers, may yield unexpected
1808 diagnostics. For example, this has been reported:
1810 Cannot write to /dev/dlt: Invalid argument
1812 In such cases, it sometimes happen that the `tar' bundled by the system
1813 is aware of block size idiosyncrasies, while GNU `tar' requires an
1814 explicit specification for the block size, which it cannot guess. This
1815 yields some people to consider GNU `tar' is misbehaving, because by
1816 comparison, `the bundle `tar' works OK'. Adding `-b 256', for example,
1817 might resolve the problem.
1819 If you use a non-default blocking factor when you create an archive,
1820 you must specify the same blocking factor when you modify that archive.
1821 Some archive devices will also require you to specify the blocking
1822 factor when reading that archive, however this is not typically the
1823 case. Usually, you can use `--list' (`-t') without specifying a
1824 blocking factor--`tar' reports a non-default record size and then lists
1825 the archive members as it would normally. To extract files from an
1826 archive with a non-standard blocking factor (particularly if you're not
1827 sure what the blocking factor is), you can usually use the
1828 `--read-full-records' (`-B') option while specifying a blocking factor
1829 larger then the blocking factor of the archive (i.e., `tar --extract
1830 --read-full-records --blocking-factor=300'). *Note list::, for more
1831 information on the `--list' (`-t') operation. *Note Reading::, for a
1832 more detailed explanation of that option.
1834 `--blocking-factor=NUMBER'
1836 Specifies the blocking factor of an archive. Can be used with any
1837 operation, but is usually not necessary with `--list' (`-t').
1842 `--blocking-factor=BLOCKS'
1843 Set record size to BLOCKS*512 bytes.
1845 This option is used to specify a "blocking factor" for the archive.
1846 When reading or writing the archive, `tar', will do reads and
1847 writes of the archive in records of BLOCK*512 bytes. This is true
1848 even when the archive is compressed. Some devices requires that
1849 all write operations be a multiple of a certain size, and so, `tar'
1850 pads the archive out to the next record boundary.
1852 The default blocking factor is set when `tar' is compiled, and is
1853 typically 20. Blocking factors larger than 20 cannot be read by
1854 very old versions of `tar', or by some newer versions of `tar'
1855 running on old machines with small address spaces.
1857 With a magnetic tape, larger records give faster throughput and fit
1858 more data on a tape (because there are fewer inter-record gaps).
1859 If the archive is in a disk file or a pipe, you may want to specify
1860 a smaller blocking factor, since a large one will result in a large
1861 number of null bytes at the end of the archive.
1863 When writing cartridge or other streaming tapes, a much larger
1864 blocking factor (say 126 or more) will greatly increase
1865 performance. However, you must specify the same blocking factor
1866 when reading or updating the archive.
1868 Apparently, Exabyte drives have a physical block size of 8K bytes.
1869 If we choose our blocksize as a multiple of 8k bytes, then the
1870 problem seems to disappear. Id est, we are using block size of
1871 112 right now, and we haven't had the problem since we switched...
1873 With GNU `tar' the blocking factor is limited only by the maximum
1874 record size of the device containing the archive, or by the amount
1875 of available virtual memory.
1877 However, deblocking or reblocking is virtually avoided in a special
1878 case which often occurs in practice, but which requires all the
1879 following conditions to be simultaneously true:
1880 * the archive is subject to a compression option,
1882 * the archive is not handled through standard input or output,
1883 nor redirected nor piped,
1885 * the archive is directly handled to a local disk, instead of
1888 * `--blocking-factor' is not explicitly specified on the `tar'
1891 If the output goes directly to a local disk, and not through
1892 stdout, then the last write is not extended to a full record size.
1893 Otherwise, reblocking occurs. Here are a few other remarks on this
1896 * `gzip' will complain about trailing garbage if asked to
1897 uncompress a compressed archive on tape, there is an option
1898 to turn the message off, but it breaks the regularity of
1899 simply having to use `PROG -d' for decompression. It would
1900 be nice if gzip was silently ignoring any number of trailing
1901 zeros. I'll ask Jean-loup Gailly, by sending a copy of this
1904 * `compress' does not show this problem, but as Jean-loup
1905 pointed out to Michael, `compress -d' silently adds garbage
1906 after the result of decompression, which tar ignores because
1907 it already recognized its end-of-file indicator. So this bug
1908 may be safely ignored.
1910 * `gzip -d -q' will be silent about the trailing zeros indeed,
1911 but will still return an exit status of 2 which tar reports
1912 in turn. `tar' might ignore the exit status returned, but I
1913 hate doing that, as it weakens the protection `tar' offers
1914 users against other possible problems at decompression time.
1915 If `gzip' was silently skipping trailing zeros _and_ also
1916 avoiding setting the exit status in this innocuous case, that
1917 would solve this situation.
1919 * `tar' should become more solid at not stopping to read a pipe
1920 at the first null block encountered. This inelegantly breaks
1921 the pipe. `tar' should rather drain the pipe out before
1926 Ignore blocks of zeros in archive (means EOF).
1928 The `--ignore-zeros' (`-i') option causes `tar' to ignore blocks
1929 of zeros in the archive. Normally a block of zeros indicates the
1930 end of the archive, but when reading a damaged archive, or one
1931 which was created by concatenating several archives together, this
1932 option allows `tar' to read the entire archive. This option is
1933 not on by default because many versions of `tar' write garbage
1934 after the zeroed blocks.
1936 Note that this option causes `tar' to read to the end of the
1937 archive file, which may sometimes avoid problems when multiple
1938 files are stored on a single physical tape.
1941 `--read-full-records'
1942 Reblock as we read (for reading 4.2BSD pipes).
1944 If `--read-full-records' is used, `tar' will not panic if an
1945 attempt to read a record from the archive does not return a full
1946 record. Instead, `tar' will keep reading until it has obtained a
1949 This option is turned on by default when `tar' is reading an
1950 archive from standard input, or from a remote machine. This is
1951 because on BSD Unix systems, a read of a pipe will return however
1952 much happens to be in the pipe, even if it is less than `tar'
1953 requested. If this option was not used, `tar' would fail as soon
1954 as it read an incomplete record from the pipe.
1956 This option is also useful with the commands for updating an
1962 When handling various tapes or cartridges, you have to take care of
1963 selecting a proper blocking, that is, the number of disk blocks you put
1964 together as a single tape block on the tape, without intervening tape
1965 gaps. A "tape gap" is a small landing area on the tape with no
1966 information on it, used for decelerating the tape to a full stop, and
1967 for later regaining the reading or writing speed. When the tape driver
1968 starts reading a record, the record has to be read whole without
1969 stopping, as a tape gap is needed to stop the tape motion without
1972 Using higher blocking (putting more disk blocks per tape block) will
1973 use the tape more efficiently as there will be less tape gaps. But
1974 reading such tapes may be more difficult for the system, as more memory
1975 will be required to receive at once the whole record. Further, if
1976 there is a reading error on a huge record, this is less likely that the
1977 system will succeed in recovering the information. So, blocking should
1978 not be too low, nor it should be too high. `tar' uses by default a
1979 blocking of 20 for historical reasons, and it does not really matter
1980 when reading or writing to disk. Current tape technology would easily
1981 accommodate higher blockings. Sun recommends a blocking of 126 for
1982 Exabytes and 96 for DATs. We were told that for some DLT drives, the
1983 blocking should be a multiple of 4Kb, preferably 64Kb (`-b 128') or 256
1984 for decent performance. Other manufacturers may use different
1985 recommendations for the same tapes. This might also depends of the
1986 buffering techniques used inside modern tape controllers. Some imposes
1987 a minimum blocking, or a maximum blocking. Others request blocking to
1988 be some exponent of two.
1990 So, there is no fixed rule for blocking. But blocking at read time
1991 should ideally be the same as blocking used at write time. At one place
1992 I know, with a wide variety of equipment, they found it best to use a
1993 blocking of 32 to guarantee that their tapes are fully interchangeable.
1995 I was also told that, for recycled tapes, prior erasure (by the same
1996 drive unit that will be used to create the archives) sometimes lowers
1997 the error rates observed at rewriting time.
1999 I might also use `--number-blocks' instead of `--block-number', so
2000 `--block' will then expand to `--blocking-factor' unambiguously.
2003 File: tar.info, Node: Many, Next: Using Multiple Tapes, Prev: Blocking, Up: Media
2005 9.5 Many Archives on One Tape
2006 =============================
2008 Most tape devices have two entries in the `/dev' directory, or entries
2009 that come in pairs, which differ only in the minor number for this
2010 device. Let's take for example `/dev/tape', which often points to the
2011 only or usual tape device of a given system. There might be a
2012 corresponding `/dev/nrtape' or `/dev/ntape'. The simpler name is the
2013 _rewinding_ version of the device, while the name having `nr' in it is
2014 the _no rewinding_ version of the same device.
2016 A rewinding tape device will bring back the tape to its beginning
2017 point automatically when this device is opened or closed. Since `tar'
2018 opens the archive file before using it and closes it afterwards, this
2019 means that a simple:
2021 $ tar cf /dev/tape DIRECTORY
2023 will reposition the tape to its beginning both prior and after saving
2024 DIRECTORY contents to it, thus erasing prior tape contents and making
2025 it so that any subsequent write operation will destroy what has just
2028 So, a rewinding device is normally meant to hold one and only one
2029 file. If you want to put more than one `tar' archive on a given tape,
2030 you will need to avoid using the rewinding version of the tape device.
2031 You will also have to pay special attention to tape positioning.
2032 Errors in positioning may overwrite the valuable data already on your
2033 tape. Many people, burnt by past experiences, will only use rewinding
2034 devices and limit themselves to one file per tape, precisely to avoid
2035 the risk of such errors. Be fully aware that writing at the wrong
2036 position on a tape loses all information past this point and most
2037 probably until the end of the tape, and this destroyed information
2038 _cannot_ be recovered.
2040 To save DIRECTORY-1 as a first archive at the beginning of a tape,
2041 and leave that tape ready for a second archive, you should use:
2043 $ mt -f /dev/nrtape rewind
2044 $ tar cf /dev/nrtape DIRECTORY-1
2046 "Tape marks" are special magnetic patterns written on the tape
2047 media, which are later recognizable by the reading hardware. These
2048 marks are used after each file, when there are many on a single tape.
2049 An empty file (that is to say, two tape marks in a row) signal the
2050 logical end of the tape, after which no file exist. Usually,
2051 non-rewinding tape device drivers will react to the close request issued
2052 by `tar' by first writing two tape marks after your archive, and by
2053 backspacing over one of these. So, if you remove the tape at that time
2054 from the tape drive, it is properly terminated. But if you write
2055 another file at the current position, the second tape mark will be
2056 erased by the new information, leaving only one tape mark between files.
2058 So, you may now save DIRECTORY-2 as a second archive after the first
2059 on the same tape by issuing the command:
2061 $ tar cf /dev/nrtape DIRECTORY-2
2063 and so on for all the archives you want to put on the same tape.
2065 Another usual case is that you do not write all the archives the same
2066 day, and you need to remove and store the tape between two archive
2067 sessions. In general, you must remember how many files are already
2068 saved on your tape. Suppose your tape already has 16 files on it, and
2069 that you are ready to write the 17th. You have to take care of skipping
2070 the first 16 tape marks before saving DIRECTORY-17, say, by using these
2073 $ mt -f /dev/nrtape rewind
2074 $ mt -f /dev/nrtape fsf 16
2075 $ tar cf /dev/nrtape DIRECTORY-17
2077 In all the previous examples, we put aside blocking considerations,
2078 but you should do the proper things for that as well. *Note Blocking::.
2082 * Tape Positioning:: Tape Positions and Tape Marks
2083 * mt:: The `mt' Utility
2086 File: tar.info, Node: Tape Positioning, Next: mt, Up: Many
2088 9.5.1 Tape Positions and Tape Marks
2089 -----------------------------------
2091 _(This message will disappear, once this node revised.)_
2093 Just as archives can store more than one file from the file system,
2094 tapes can store more than one archive file. To keep track of where
2095 archive files (or any other type of file stored on tape) begin and end,
2096 tape archive devices write magnetic "tape marks" on the archive media.
2097 Tape drives write one tape mark between files, two at the end of all
2100 If you think of data as a series of records "rrrr"'s, and tape marks
2101 as "*"'s, a tape might look like the following:
2103 rrrr*rrrrrr*rrrrr*rr*rrrrr**-------------------------
2105 Tape devices read and write tapes using a read/write "tape head"--a
2106 physical part of the device which can only access one point on the tape
2107 at a time. When you use `tar' to read or write archive data from a
2108 tape device, the device will begin reading or writing from wherever on
2109 the tape the tape head happens to be, regardless of which archive or
2110 what part of the archive the tape head is on. Before writing an
2111 archive, you should make sure that no data on the tape will be
2112 overwritten (unless it is no longer needed). Before reading an
2113 archive, you should make sure the tape head is at the beginning of the
2114 archive you want to read. You can do it manually via `mt' utility
2115 (*note mt::). The `restore' script does that automatically (*note
2116 Scripted Restoration::).
2118 If you want to add new archive file entries to a tape, you should
2119 advance the tape to the end of the existing file entries, backspace
2120 over the last tape mark, and write the new archive file. If you were
2121 to add two archives to the example above, the tape might look like the
2124 rrrr*rrrrrr*rrrrr*rr*rrrrr*rrr*rrrr**----------------
2127 File: tar.info, Node: mt, Prev: Tape Positioning, Up: Many
2129 9.5.2 The `mt' Utility
2130 ----------------------
2132 _(This message will disappear, once this node revised.)_
2134 *Note Blocking Factor::.
2136 You can use the `mt' utility to advance or rewind a tape past a
2137 specified number of archive files on the tape. This will allow you to
2138 move to the beginning of an archive before extracting or reading it, or
2139 to the end of all the archives before writing a new one.
2141 The syntax of the `mt' command is:
2143 mt [-f TAPENAME] OPERATION [NUMBER]
2145 where TAPENAME is the name of the tape device, NUMBER is the number
2146 of times an operation is performed (with a default of one), and
2147 OPERATION is one of the following:
2151 Writes NUMBER tape marks at the current position on the tape.
2154 Moves tape position forward NUMBER files.
2157 Moves tape position back NUMBER files.
2160 Rewinds the tape. (Ignores NUMBER.)
2164 Rewinds the tape and takes the tape device off-line. (Ignores
2168 Prints status information about the tape unit.
2171 If you don't specify a TAPENAME, `mt' uses the environment variable
2172 `TAPE'; if `TAPE' is not set, `mt' will use the default device
2173 specified in your `sys/mtio.h' file (`DEFTAPE' variable). If this is
2174 not defined, the program will display a descriptive error message and
2177 `mt' returns a 0 exit status when the operation(s) were successful,
2178 1 if the command was unrecognized, and 2 if an operation failed.
2181 File: tar.info, Node: Using Multiple Tapes, Next: label, Prev: Many, Up: Media
2183 9.6 Using Multiple Tapes
2184 ========================
2186 Often you might want to write a large archive, one larger than will fit
2187 on the actual tape you are using. In such a case, you can run multiple
2188 `tar' commands, but this can be inconvenient, particularly if you are
2189 using options like `--exclude=PATTERN' or dumping entire file systems.
2190 Therefore, `tar' provides a special mode for creating multi-volume
2193 "Multi-volume" archive is a single `tar' archive, stored on several
2194 media volumes of fixed size. Although in this section we will often
2195 call `volume' a "tape", there is absolutely no requirement for
2196 multi-volume archives to be stored on tapes. Instead, they can use
2197 whatever media type the user finds convenient, they can even be located
2200 When creating a multi-volume archive, GNU `tar' continues to fill
2201 current volume until it runs out of space, then it switches to next
2202 volume (usually the operator is queried to replace the tape on this
2203 point), and continues working on the new volume. This operation
2204 continues until all requested files are dumped. If GNU `tar' detects
2205 end of media while dumping a file, such a file is archived in split
2206 form. Some very big files can even be split across several volumes.
2208 Each volume is itself a valid GNU `tar' archive, so it can be read
2209 without any special options. Consequently any file member residing
2210 entirely on one volume can be extracted or otherwise operated upon
2211 without needing the other volume. Sure enough, to extract a split
2212 member you would need all volumes its parts reside on.
2214 Multi-volume archives suffer from several limitations. In
2215 particular, they cannot be compressed.
2217 GNU `tar' is able to create multi-volume archives of two formats
2218 (*note Formats::): `GNU' and `POSIX'.
2222 * Multi-Volume Archives:: Archives Longer than One Tape or Disk
2223 * Tape Files:: Tape Files
2224 * Tarcat:: Concatenate Volumes into a Single Archive
2227 File: tar.info, Node: Multi-Volume Archives, Next: Tape Files, Up: Using Multiple Tapes
2229 9.6.1 Archives Longer than One Tape or Disk
2230 -------------------------------------------
2232 To create an archive that is larger than will fit on a single unit of
2233 the media, use the `--multi-volume' (`-M') option in conjunction with
2234 the `--create' option (*note create::). A "multi-volume" archive can
2235 be manipulated like any other archive (provided the `--multi-volume'
2236 option is specified), but is stored on more than one tape or file.
2238 When you specify `--multi-volume', `tar' does not report an error
2239 when it comes to the end of an archive volume (when reading), or the
2240 end of the media (when writing). Instead, it prompts you to load a new
2241 storage volume. If the archive is on a magnetic tape, you should
2242 change tapes when you see the prompt; if the archive is on a floppy
2243 disk, you should change disks; etc.
2247 Creates a multi-volume archive, when used in conjunction with
2248 `--create' (`-c'). To perform any other operation on a
2249 multi-volume archive, specify `--multi-volume' in conjunction with
2250 that operation. For example:
2252 $ tar --create --multi-volume --file=/dev/tape FILES
2254 The method `tar' uses to detect end of tape is not perfect, and
2255 fails on some operating systems or on some devices. If `tar' cannot
2256 detect the end of the tape itself, you can use `--tape-length' option
2257 to inform it about the capacity of the tape:
2259 `--tape-length=SIZE'
2261 Set maximum length of a volume. The SIZE argument should then be
2262 the usable size of the tape in units of 1024 bytes. This option
2263 selects `--multi-volume' automatically. For example:
2265 $ tar --create --tape-length=41943040 --file=/dev/tape FILES
2267 When GNU `tar' comes to the end of a storage media, it asks you to
2268 change the volume. The built-in prompt for POSIX locale is(1):
2270 Prepare volume #N for `ARCHIVE' and hit return:
2272 where N is the ordinal number of the volume to be created and ARCHIVE
2273 is archive file or device name.
2275 When prompting for a new tape, `tar' accepts any of the following
2279 Request `tar' to explain possible responses.
2282 Request `tar' to exit immediately.
2285 Request `tar' to write the next volume on the file FILE-NAME.
2288 Request `tar' to run a subshell. This option can be disabled by
2289 giving `--restrict' command line option to `tar'(2).
2292 Request `tar' to begin writing the next volume.
2294 (You should only type `y' after you have changed the tape; otherwise
2295 `tar' will write over the volume it just finished.)
2297 The volume number used by `tar' in its tape-changing prompt can be
2298 changed; if you give the `--volno-file=FILE-OF-NUMBER' option, then
2299 FILE-OF-NUMBER should be an non-existing file to be created, or else, a
2300 file already containing a decimal number. That number will be used as
2301 the volume number of the first volume written. When `tar' is finished,
2302 it will rewrite the file with the now-current volume number. (This does
2303 not change the volume number written on a tape label, as per *note
2304 label::, it _only_ affects the number used in the prompt.)
2306 If you want more elaborate behavior than this, you can write a
2307 special "new volume script", that will be responsible for changing the
2308 volume, and instruct `tar' to use it instead of its normal prompting
2311 `--info-script=SCRIPT-NAME'
2312 `--new-volume-script=SCRIPT-NAME'
2314 Specify the full name of the volume script to use. The script can
2315 be used to eject cassettes, or to broadcast messages such as
2316 `Someone please come change my tape' when performing unattended
2319 The SCRIPT-NAME is executed without any command line arguments. It
2320 inherits `tar''s shell environment. Additional data is passed to it
2321 via the following environment variables:
2324 GNU `tar' version number.
2327 The name of the archive `tar' is processing.
2329 `TAR_BLOCKING_FACTOR'
2330 Current blocking factor (*note Blocking::).
2333 Ordinal number of the volume `tar' is about to start.
2336 A short option describing the operation `tar' is executing. *Note
2337 Operations::, for a complete list of subcommand options.
2340 Format of the archive being processed. *Note Formats::, for a
2341 complete list of archive format names.
2344 File descriptor which can be used to communicate the new volume
2347 The volume script can instruct `tar' to use new archive name, by
2348 writing in to file descriptor `$TAR_FD' (see below for an example).
2350 If the info script fails, `tar' exits; otherwise, it begins writing
2353 If you want `tar' to cycle through a series of files or tape drives,
2354 there are three approaches to choose from. First of all, you can give
2355 `tar' multiple `--file' options. In this case the specified files will
2356 be used, in sequence, as the successive volumes of the archive. Only
2357 when the first one in the sequence needs to be used again will `tar'
2358 prompt for a tape change (or run the info script). For example,
2359 suppose someone has two tape drives on a system named `/dev/tape0' and
2360 `/dev/tape1'. For having GNU `tar' to switch to the second drive when
2361 it needs to write the second tape, and then back to the first tape,
2362 etc., just do either of:
2364 $ tar --create --multi-volume --file=/dev/tape0 --file=/dev/tape1 FILES
2365 $ tar cMff /dev/tape0 /dev/tape1 FILES
2367 The second method is to use the `n' response to the tape-change
2370 Finally, the most flexible approach is to use a volume script, that
2371 writes new archive name to the file descriptor `$TAR_FD'. For example,
2372 the following volume script will create a series of archive files, named
2373 `ARCHIVE-VOL', where ARCHIVE is the name of the archive being created
2374 (as given by `--file' option) and VOL is the ordinal number of the
2375 archive being created:
2378 echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.
2380 name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
2381 case $TAR_SUBCOMMAND in
2383 -d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
2388 echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD
2390 The same script can be used while listing, comparing or extracting
2391 from the created archive. For example:
2393 # Create a multi-volume archive:
2394 $ tar -c -L1024 -f archive.tar -F new-volume .
2395 # Extract from the created archive:
2396 $ tar -x -f archive.tar -F new-volume .
2398 Notice, that the first command had to use `-L' option, since otherwise
2399 GNU `tar' will end up writing everything to file `archive.tar'.
2401 You can read each individual volume of a multi-volume archive as if
2402 it were an archive by itself. For example, to list the contents of one
2403 volume, use `--list', without `--multi-volume' specified. To extract
2404 an archive member from one volume (assuming it is described that
2405 volume), use `--extract', again without `--multi-volume'.
2407 If an archive member is split across volumes (i.e., its entry begins
2408 on one volume of the media and ends on another), you need to specify
2409 `--multi-volume' to extract it successfully. In this case, you should
2410 load the volume where the archive member starts, and use `tar --extract
2411 --multi-volume'--`tar' will prompt for later volumes as it needs them.
2412 *Note extracting archives::, for more information about extracting
2415 Multi-volume archives can be modified like any other archive. To add
2416 files to a multi-volume archive, you need to only mount the last volume
2417 of the archive media (and new volumes, if needed). For all other
2418 operations, you need to use the entire archive.
2420 If a multi-volume archive was labeled using `--label=ARCHIVE-LABEL'
2421 (*note label::) when it was created, `tar' will not automatically label
2422 volumes which are added later. To label subsequent volumes, specify
2423 `--label=ARCHIVE-LABEL' again in conjunction with the `--append',
2424 `--update' or `--concatenate' operation.
2426 Notice that multi-volume support is a GNU extension and the archives
2427 created in this mode should be read only using GNU `tar'. If you
2428 absolutely have to process such archives using a third-party `tar'
2429 implementation, read *note Split Recovery::.
2431 ---------- Footnotes ----------
2433 (1) If you run GNU `tar' under a different locale, the translation
2434 to the locale's language will be used.
2436 (2) *Note --restrict::, for more information about this option.
2439 File: tar.info, Node: Tape Files, Next: Tarcat, Prev: Multi-Volume Archives, Up: Using Multiple Tapes
2444 _(This message will disappear, once this node revised.)_
2446 To give the archive a name which will be recorded in it, use the
2447 `--label=VOLUME-LABEL' (`-V VOLUME-LABEL') option. This will write a
2448 special block identifying VOLUME-LABEL as the name of the archive to
2449 the front of the archive which will be displayed when the archive is
2450 listed with `--list'. If you are creating a multi-volume archive with
2451 `--multi-volume' (*note Using Multiple Tapes::), then the volume label
2452 will have `Volume NNN' appended to the name you give, where NNN is the
2453 number of the volume of the archive. If you use the
2454 `--label=VOLUME-LABEL') option when reading an archive, it checks to
2455 make sure the label on the tape matches the one you give. *Note label::.
2457 When `tar' writes an archive to tape, it creates a single tape file.
2458 If multiple archives are written to the same tape, one after the other,
2459 they each get written as separate tape files. When extracting, it is
2460 necessary to position the tape at the right place before running `tar'.
2461 To do this, use the `mt' command. For more information on the `mt'
2462 command and on the organization of tapes into a sequence of tape files,
2465 People seem to often do:
2467 --label="SOME-PREFIX `date +SOME-FORMAT`"
2469 or such, for pushing a common date in all volumes or an archive set.
2472 File: tar.info, Node: Tarcat, Prev: Tape Files, Up: Using Multiple Tapes
2474 9.6.3 Concatenate Volumes into a Single Archive
2475 -----------------------------------------------
2477 Sometimes it is necessary to convert existing GNU `tar' multi-volume
2478 archive to a single `tar' archive. Simply concatenating all volumes
2479 into one will not work, since each volume carries an additional
2480 information at the beginning. GNU `tar' is shipped with the shell
2481 script `tarcat' designed for this purpose.
2483 The script takes a list of files comprising a multi-volume archive
2484 and creates the resulting archive at the standard output. For example:
2486 tarcat vol.1 vol.2 vol.3 | tar tf -
2488 The script implements a simple heuristics to determine the format of
2489 the first volume file and to decide how to process the rest of the
2490 files. However, it makes no attempt to verify whether the files are
2491 given in order or even if they are valid `tar' archives. It uses `dd'
2492 and does not filter its standard error, so you will usually see lots of
2496 File: tar.info, Node: label, Next: verify, Prev: Using Multiple Tapes, Up: Media
2498 9.7 Including a Label in the Archive
2499 ====================================
2501 _(This message will disappear, once this node revised.)_
2503 To avoid problems caused by misplaced paper labels on the archive
2504 media, you can include a "label" entry--an archive member which
2505 contains the name of the archive--in the archive itself. Use the
2506 `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') option in conjunction with
2507 the `--create' operation to include a label entry in the archive as it
2510 `--label=ARCHIVE-LABEL'
2512 Includes an "archive-label" at the beginning of the archive when
2513 the archive is being created, when used in conjunction with the
2514 `--create' operation. Checks to make sure the archive label
2515 matches the one specified (when used in conjunction with any other
2518 If you create an archive using both `--label=ARCHIVE-LABEL' (`-V
2519 ARCHIVE-LABEL') and `--multi-volume' (`-M'), each volume of the archive
2520 will have an archive label of the form `ARCHIVE-LABEL Volume N', where
2521 N is 1 for the first volume, 2 for the next, and so on. *Note Using
2522 Multiple Tapes::, for information on creating multiple volume archives.
2524 The volume label will be displayed by `--list' along with the file
2525 contents. If verbose display is requested, it will also be explicitly
2526 marked as in the example below:
2528 $ tar --verbose --list --file=iamanarchive
2529 V--------- 0 0 0 1992-03-07 12:01 iamalabel--Volume Header--
2530 -rw-r--r-- ringo user 40 1990-05-21 13:30 iamafilename
2532 However, `--list' option will cause listing entire contents of the
2533 archive, which may be undesirable (for example, if the archive is
2534 stored on a tape). You can request checking only the volume by
2535 specifying `--test-label' option. This option reads only the first
2536 block of an archive, so it can be used with slow storage devices. For
2539 $ tar --test-label --file=iamanarchive
2542 If `--test-label' is used with a single command line argument, `tar'
2543 compares the volume label with the argument. It exits with code 0 if
2544 the two strings match, and with code 2 otherwise. In this case no
2545 output is displayed. For example:
2547 $ tar --test-label --file=iamanarchive 'iamalable'
2549 $ tar --test-label --file=iamanarchive 'iamalable' alabel
2552 If you request any operation, other than `--create', along with
2553 using `--label' option, `tar' will first check if the archive label
2554 matches the one specified and will refuse to proceed if it does not.
2555 Use this as a safety precaution to avoid accidentally overwriting
2556 existing archives. For example, if you wish to add files to `archive',
2557 presumably labeled with string `My volume', you will get:
2559 $ tar -rf archive --label 'My volume' .
2560 tar: Archive not labeled to match `My volume'
2562 in case its label does not match. This will work even if `archive' is
2565 Similarly, `tar' will refuse to list or extract the archive if its
2566 label doesn't match the ARCHIVE-LABEL specified. In those cases,
2567 ARCHIVE-LABEL argument is interpreted as a globbing-style pattern which
2568 must match the actual magnetic volume label. *Note exclude::, for a
2569 precise description of how match is attempted(1). If the switch
2570 `--multi-volume' (`-M') is being used, the volume label matcher will
2571 also suffix ARCHIVE-LABEL by ` Volume [1-9]*' if the initial match
2572 fails, before giving up. Since the volume numbering is automatically
2573 added in labels at creation time, it sounded logical to equally help
2574 the user taking care of it when the archive is being read.
2576 The `--label' was once called `--volume', but is not available under
2579 You can also use `--label' to get a common information on all tapes
2580 of a series. For having this information different in each series
2581 created through a single script used on a regular basis, just manage to
2582 get some date string as part of the label. For example:
2584 $ tar cfMV /dev/tape "Daily backup for `date +%Y-%m-%d`"
2585 $ tar --create --file=/dev/tape --multi-volume \
2586 --label="Daily backup for `date +%Y-%m-%d`"
2588 Also note that each label has its own date and time, which
2589 corresponds to when GNU `tar' initially attempted to write it, often
2590 soon after the operator launches `tar' or types the carriage return
2591 telling that the next tape is ready. Comparing date labels does give
2592 an idea of tape throughput only if the delays for rewinding tapes and
2593 the operator switching them were negligible, which is usually not the
2596 ---------- Footnotes ----------
2598 (1) Previous versions of `tar' used full regular expression
2599 matching, or before that, only exact string matching, instead of
2600 wildcard matchers. We decided for the sake of simplicity to use a
2601 uniform matching device through `tar'.
2604 File: tar.info, Node: verify, Next: Write Protection, Prev: label, Up: Media
2606 9.8 Verifying Data as It is Stored
2607 ==================================
2611 Attempt to verify the archive after writing.
2613 This option causes `tar' to verify the archive after writing it.
2614 Each volume is checked after it is written, and any discrepancies are
2615 recorded on the standard error output.
2617 Verification requires that the archive be on a back-space-able
2618 medium. This means pipes, some cartridge tape drives, and some other
2619 devices cannot be verified.
2621 You can insure the accuracy of an archive by comparing files in the
2622 system with archive members. `tar' can compare an archive to the file
2623 system as the archive is being written, to verify a write operation, or
2624 can compare a previously written archive, to insure that it is up to
2627 To check for discrepancies in an archive immediately after it is
2628 written, use the `--verify' (`-W') option in conjunction with the
2629 `--create' operation. When this option is specified, `tar' checks
2630 archive members against their counterparts in the file system, and
2631 reports discrepancies on the standard error.
2633 To verify an archive, you must be able to read it from before the end
2634 of the last written entry. This option is useful for detecting data
2635 errors on some tapes. Archives written to pipes, some cartridge tape
2636 drives, and some other devices cannot be verified.
2638 One can explicitly compare an already made archive with the file
2639 system by using the `--compare' (`--diff', `-d') option, instead of
2640 using the more automatic `--verify' option. *Note compare::.
2642 Note that these two options have a slightly different intent. The
2643 `--compare' option checks how identical are the logical contents of some
2644 archive with what is on your disks, while the `--verify' option is
2645 really for checking if the physical contents agree and if the recording
2646 media itself is of dependable quality. So, for the `--verify'
2647 operation, `tar' tries to defeat all in-memory cache pertaining to the
2648 archive, while it lets the speed optimization undisturbed for the
2649 `--compare' option. If you nevertheless use `--compare' for media
2650 verification, you may have to defeat the in-memory cache yourself,
2651 maybe by opening and reclosing the door latch of your recording unit,
2652 forcing some doubt in your operating system about the fact this is
2653 really the same volume as the one just written or read.
2655 The `--verify' option would not be necessary if drivers were indeed
2656 able to detect dependably all write failures. This sometimes require
2657 many magnetic heads, some able to read after the writes occurred. One
2658 would not say that drivers unable to detect all cases are necessarily
2659 flawed, as long as programming is concerned.
2661 The `--verify' (`-W') option will not work in conjunction with the
2662 `--multi-volume' (`-M') option or the `--append' (`-r'), `--update'
2663 (`-u') and `--delete' operations. *Note Operations::, for more
2664 information on these operations.
2666 Also, since `tar' normally strips leading `/' from file names (*note
2667 absolute::), a command like `tar --verify -cf /tmp/foo.tar /etc' will
2668 work as desired only if the working directory is `/', as `tar' uses the
2669 archive's relative member names (e.g., `etc/motd') when verifying the
2673 File: tar.info, Node: Write Protection, Prev: verify, Up: Media
2675 9.9 Write Protection
2676 ====================
2678 Almost all tapes and diskettes, and in a few rare cases, even disks can
2679 be "write protected", to protect data on them from being changed. Once
2680 an archive is written, you should write protect the media to prevent
2681 the archive from being accidentally overwritten or deleted. (This will
2682 protect the archive from being changed with a tape or floppy drive--it
2683 will not protect it from magnet fields or other physical hazards.)
2685 The write protection device itself is usually an integral part of the
2686 physical media, and can be a two position (write enabled/write
2687 disabled) switch, a notch which can be popped out or covered, a ring
2688 which can be removed from the center of a tape reel, or some other
2692 File: tar.info, Node: Changes, Next: Configuring Help Summary, Prev: Media, Up: Top
2697 This appendix lists some important user-visible changes between version
2698 GNU `tar' 1.23 and previous versions. An up-to-date version of this
2699 document is available at the GNU `tar' documentation page
2700 (http://www.gnu.org/software/tar/manual/changes.html).
2702 Use of globbing patterns when listing and extracting.
2703 Previous versions of GNU tar assumed shell-style globbing when
2704 extracting from or listing an archive. For example:
2706 $ tar xf foo.tar '*.c'
2708 would extract all files whose names end in `.c'. This behavior
2709 was not documented and was incompatible with traditional tar
2710 implementations. Therefore, starting from version 1.15.91, GNU tar
2711 no longer uses globbing by default. For example, the above
2712 invocation is now interpreted as a request to extract from the
2713 archive the file named `*.c'.
2715 To facilitate transition to the new behavior for those users who
2716 got used to the previous incorrect one, `tar' will print a warning
2717 if it finds out that a requested member was not found in the
2718 archive and its name looks like a globbing pattern. For example:
2720 $ tar xf foo.tar '*.c'
2721 tar: Pattern matching characters used in file names. Please,
2722 tar: use --wildcards to enable pattern matching, or --no-wildcards to
2723 tar: suppress this warning.
2724 tar: *.c: Not found in archive
2725 tar: Error exit delayed from previous errors
2727 To treat member names as globbing patterns, use the `--wildcards'
2728 option. If you want to tar to mimic the behavior of versions
2729 prior to 1.15.91, add this option to your `TAR_OPTIONS' variable.
2731 *Note wildcards::, for the detailed discussion of the use of
2732 globbing patterns by GNU `tar'.
2734 Use of short option `-o'.
2735 Earlier versions of GNU `tar' understood `-o' command line option
2736 as a synonym for `--old-archive'.
2738 GNU `tar' starting from version 1.13.90 understands this option as
2739 a synonym for `--no-same-owner'. This is compatible with UNIX98
2740 `tar' implementations.
2742 However, to facilitate transition, `-o' option retains its old
2743 semantics when it is used with one of archive-creation commands.
2744 Users are encouraged to use `--format=oldgnu' instead.
2746 It is especially important, since versions of GNU Automake up to
2747 and including 1.8.4 invoke tar with this option to produce
2748 distribution tarballs. *Note v7: Formats, for the detailed
2749 discussion of this issue and its implications.
2751 *Note tar-formats: (automake)Options, for a description on how to
2752 use various archive formats with `automake'.
2754 Future versions of GNU `tar' will understand `-o' only as a
2755 synonym for `--no-same-owner'.
2757 Use of short option `-l'
2758 Earlier versions of GNU `tar' understood `-l' option as a synonym
2759 for `--one-file-system'. Since such usage contradicted to UNIX98
2760 specification and harmed compatibility with other implementations,
2761 it was declared deprecated in version 1.14. However, to
2762 facilitate transition to its new semantics, it was supported by
2763 versions 1.15 and 1.15.90. The present use of `-l' as a short
2764 variant of `--check-links' was introduced in version 1.15.91.
2766 Use of options `--portability' and `--old-archive'
2767 These options are deprecated. Please use `--format=v7' instead.
2769 Use of option `--posix'
2770 This option is deprecated. Please use `--format=posix' instead.
2773 File: tar.info, Node: Configuring Help Summary, Next: Fixing Snapshot Files, Prev: Changes, Up: Top
2775 Appendix B Configuring Help Summary
2776 ***********************************
2778 Running `tar --help' displays the short `tar' option summary (*note
2779 help::). This summary is organized by "groups" of semantically close
2780 options. The options within each group are printed in the following
2781 order: a short option, eventually followed by a list of corresponding
2782 long option names, followed by a short description of the option. For
2783 example, here is an excerpt from the actual `tar --help' output:
2785 Main operation mode:
2787 -A, --catenate, --concatenate append tar files to an archive
2788 -c, --create create a new archive
2789 -d, --diff, --compare find differences between archive and
2791 --delete delete from the archive
2793 The exact visual representation of the help output is configurable
2794 via `ARGP_HELP_FMT' environment variable. The value of this variable is
2795 a comma-separated list of "format variable" assignments. There are two
2796 kinds of format variables. An "offset variable" keeps the offset of
2797 some part of help output text from the leftmost column on the screen. A
2798 "boolean" variable is a flag that toggles some output feature on or
2799 off. Depending on the type of the corresponding variable, there are two
2800 kinds of assignments:
2803 The assignment to an offset variable has the following syntax:
2807 where VARIABLE is the variable name, and VALUE is a numeric value
2808 to be assigned to the variable.
2811 To assign `true' value to a variable, simply put this variable
2812 name. To assign `false' value, prefix the variable name with
2815 # Assign `true' value:
2817 # Assign `false' value:
2820 Following variables are declared:
2822 -- Help Output: boolean dup-args
2823 If true, arguments for an option are shown with both short and long
2824 options, even when a given option has both forms, for example:
2826 -f ARCHIVE, --file=ARCHIVE use archive file or device ARCHIVE
2828 If false, then if an option has both short and long forms, the
2829 argument is only shown with the long one, for example:
2831 -f, --file=ARCHIVE use archive file or device ARCHIVE
2833 and a message indicating that the argument is applicable to both
2834 forms is printed below the options. This message can be disabled
2835 using `dup-args-note' (see below).
2837 The default is false.
2839 -- Help Output: boolean dup-args-note
2840 If this variable is true, which is the default, the following
2841 notice is displayed at the end of the help output:
2843 Mandatory or optional arguments to long options are also
2844 mandatory or optional for any corresponding short options.
2846 Setting `no-dup-args-note' inhibits this message. Normally, only
2847 one of variables `dup-args' or `dup-args-note' should be set.
2849 -- Help Output: offset short-opt-col
2850 Column in which short options start. Default is 2.
2852 $ tar --help|grep ARCHIVE
2853 -f, --file=ARCHIVE use archive file or device ARCHIVE
2854 $ ARGP_HELP_FMT=short-opt-col=6 tar --help|grep ARCHIVE
2855 -f, --file=ARCHIVE use archive file or device ARCHIVE
2857 -- Help Output: offset long-opt-col
2858 Column in which long options start. Default is 6. For example:
2860 $ tar --help|grep ARCHIVE
2861 -f, --file=ARCHIVE use archive file or device ARCHIVE
2862 $ ARGP_HELP_FMT=long-opt-col=16 tar --help|grep ARCHIVE
2863 -f, --file=ARCHIVE use archive file or device ARCHIVE
2865 -- Help Output: offset doc-opt-col
2866 Column in which "doc options" start. A doc option isn't actually
2867 an option, but rather an arbitrary piece of documentation that is
2868 displayed in much the same manner as the options. For example, in
2869 the description of `--format' option:
2871 -H, --format=FORMAT create archive of the given format.
2873 FORMAT is one of the following:
2875 gnu GNU tar 1.13.x format
2876 oldgnu GNU format as per tar <= 1.12
2877 pax POSIX 1003.1-2001 (pax) format
2879 ustar POSIX 1003.1-1988 (ustar) format
2880 v7 old V7 tar format
2882 the format names are doc options. Thus, if you set
2883 `ARGP_HELP_FMT=doc-opt-col=6' the above part of the help output
2884 will look as follows:
2886 -H, --format=FORMAT create archive of the given format.
2888 FORMAT is one of the following:
2890 gnu GNU tar 1.13.x format
2891 oldgnu GNU format as per tar <= 1.12
2892 pax POSIX 1003.1-2001 (pax) format
2894 ustar POSIX 1003.1-1988 (ustar) format
2895 v7 old V7 tar format
2897 -- Help Output: offset opt-doc-col
2898 Column in which option description starts. Default is 29.
2900 $ tar --help|grep ARCHIVE
2901 -f, --file=ARCHIVE use archive file or device ARCHIVE
2902 $ ARGP_HELP_FMT=opt-doc-col=19 tar --help|grep ARCHIVE
2903 -f, --file=ARCHIVE use archive file or device ARCHIVE
2904 $ ARGP_HELP_FMT=opt-doc-col=9 tar --help|grep ARCHIVE
2906 use archive file or device ARCHIVE
2908 Notice, that the description starts on a separate line if
2909 `opt-doc-col' value is too small.
2911 -- Help Output: offset header-col
2912 Column in which "group headers" are printed. A group header is a
2913 descriptive text preceding an option group. For example, in the
2916 Main operation mode:
2918 -A, --catenate, --concatenate append tar files to
2920 -c, --create create a new archive
2921 `Main operation mode:' is the group header.
2923 The default value is 1.
2925 -- Help Output: offset usage-indent
2926 Indentation of wrapped usage lines. Affects `--usage' output.
2929 -- Help Output: offset rmargin
2930 Right margin of the text output. Used for wrapping.
2933 File: tar.info, Node: Fixing Snapshot Files, Next: Tar Internals, Prev: Configuring Help Summary, Up: Top
2935 Appendix C Fixing Snapshot Files
2936 ********************************
2938 Sometimes device numbers can change after upgrading your kernel version
2939 or reconfiguring the hardware. Reportedly this is the case with some
2940 newer Linux kernels, when using LVM. In majority of cases this change
2941 is unnoticed by the users. However, it influences `tar' incremental
2942 backups: the device number is stored in tar snapshot files (*note
2943 Snapshot Files::) and is used to determine whether the file has changed
2944 since the last backup. If the device numbers change for some reason,
2945 the next backup you run will be a full backup.
2947 To minimize the impact in these cases, GNU `tar' comes with the
2948 `tar-snapshot-edit' utility for inspecting and updating device numbers
2949 in snapshot files. The utility, written by Dustin J. Mitchell, is
2950 available from GNU `tar' home page
2951 (http://www.gnu.org/software/tar/utils/tar-snapshot-edit.html).
2953 To obtain the device numbers used in the snapshot file, run
2955 $ tar-snapshot-edit SNAPFILE
2957 where SNAPFILE is the name of the snapshot file (you can supply as many
2958 files as you wish in a single command line).
2960 To update all occurrences of the given device number in the file, use
2961 `-r' option. It takes a single argument of the form `OLDDEV-NEWDEV',
2962 where OLDDEV is the device number used in the snapshot file, and NEWDEV
2963 is the corresponding new device number. Both numbers may be specified
2964 in hex (e.g., `0xfe01'), decimal (e.g., `65025'), or as a major:minor
2965 number pair (e.g., `254:1'). To change several device numbers at once,
2966 specify them in a single comma-separated list, as in `-r
2967 0x3060-0x4500,0x307-0x4600'.
2969 Before updating the snapshot file, it is a good idea to create a
2970 backup copy of it. This is accomplished by `-b' option. The name of
2971 the backup file is obtained by appending `~' to the original file name.
2974 $ tar-snapshot-edit /var/backup/snap.a
2976 /tmp/snap: Device 0x0306 occurs 634 times.
2977 $ tar-snapshot-edit -b -r 0x0306-0x4500 /var/backup/snap.a
2981 File: tar.info, Node: Tar Internals, Next: Genfile, Prev: Fixing Snapshot Files, Up: Top
2983 Appendix D Tar Internals
2984 ************************
2988 * Standard:: Basic Tar Format
2989 * Extensions:: GNU Extensions to the Archive Format
2990 * Sparse Formats:: Storing Sparse Files
2995 File: tar.info, Node: Standard, Next: Extensions, Up: Tar Internals
3000 _(This message will disappear, once this node revised.)_
3002 While an archive may contain many files, the archive itself is a single
3003 ordinary file. Like any other file, an archive file can be written to
3004 a storage device such as a tape or disk, sent through a pipe or over a
3005 network, saved on the active file system, or even stored in another
3006 archive. An archive file is not easy to read or manipulate without
3007 using the `tar' utility or Tar mode in GNU Emacs.
3009 Physically, an archive consists of a series of file entries
3010 terminated by an end-of-archive entry, which consists of two 512 blocks
3011 of zero bytes. A file entry usually describes one of the files in the
3012 archive (an "archive member"), and consists of a file header and the
3013 contents of the file. File headers contain file names and statistics,
3014 checksum information which `tar' uses to detect file corruption, and
3015 information about file types.
3017 Archives are permitted to have more than one member with the same
3018 member name. One way this situation can occur is if more than one
3019 version of a file has been stored in the archive. For information
3020 about adding new versions of a file to an archive, see *note update::.
3022 In addition to entries describing archive members, an archive may
3023 contain entries which `tar' itself uses to store information. *Note
3024 label::, for an example of such an archive entry.
3026 A `tar' archive file contains a series of blocks. Each block
3027 contains `BLOCKSIZE' bytes. Although this format may be thought of as
3028 being on magnetic tape, other media are often used.
3030 Each file archived is represented by a header block which describes
3031 the file, followed by zero or more blocks which give the contents of
3032 the file. At the end of the archive file there are two 512-byte blocks
3033 filled with binary zeros as an end-of-file marker. A reasonable system
3034 should write such end-of-file marker at the end of an archive, but must
3035 not assume that such a block exists when reading an archive. In
3036 particular GNU `tar' always issues a warning if it does not encounter
3039 The blocks may be "blocked" for physical I/O operations. Each
3040 record of N blocks (where N is set by the `--blocking-factor=512-SIZE'
3041 (`-b 512-SIZE') option to `tar') is written with a single `write ()'
3042 operation. On magnetic tapes, the result of such a write is a single
3043 record. When writing an archive, the last record of blocks should be
3044 written at the full size, with blocks after the zero block containing
3045 all zeros. When reading an archive, a reasonable system should
3046 properly handle an archive whose last record is shorter than the rest,
3047 or which contains garbage records after a zero block.
3049 The header block is defined in C as follows. In the GNU `tar'
3050 distribution, this is part of file `src/tar.h':
3053 /* tar Header Block, from POSIX 1003.1-1990. */
3059 char name[100]; /* 0 */
3060 char mode[8]; /* 100 */
3061 char uid[8]; /* 108 */
3062 char gid[8]; /* 116 */
3063 char size[12]; /* 124 */
3064 char mtime[12]; /* 136 */
3065 char chksum[8]; /* 148 */
3066 char typeflag; /* 156 */
3067 char linkname[100]; /* 157 */
3068 char magic[6]; /* 257 */
3069 char version[2]; /* 263 */
3070 char uname[32]; /* 265 */
3071 char gname[32]; /* 297 */
3072 char devmajor[8]; /* 329 */
3073 char devminor[8]; /* 337 */
3074 char prefix[155]; /* 345 */
3078 #define TMAGIC "ustar" /* ustar and a null */
3080 #define TVERSION "00" /* 00 and no null */
3083 /* Values used in typeflag field. */
3084 #define REGTYPE '0' /* regular file */
3085 #define AREGTYPE '\0' /* regular file */
3086 #define LNKTYPE '1' /* link */
3087 #define SYMTYPE '2' /* reserved */
3088 #define CHRTYPE '3' /* character special */
3089 #define BLKTYPE '4' /* block special */
3090 #define DIRTYPE '5' /* directory */
3091 #define FIFOTYPE '6' /* FIFO special */
3092 #define CONTTYPE '7' /* reserved */
3094 #define XHDTYPE 'x' /* Extended header referring to the
3095 next file in the archive */
3096 #define XGLTYPE 'g' /* Global extended header */
3098 /* Bits used in the mode field, values in octal. */
3099 #define TSUID 04000 /* set UID on execution */
3100 #define TSGID 02000 /* set GID on execution */
3101 #define TSVTX 01000 /* reserved */
3102 /* file permissions */
3103 #define TUREAD 00400 /* read by owner */
3104 #define TUWRITE 00200 /* write by owner */
3105 #define TUEXEC 00100 /* execute/search by owner */
3106 #define TGREAD 00040 /* read by group */
3107 #define TGWRITE 00020 /* write by group */
3108 #define TGEXEC 00010 /* execute/search by group */
3109 #define TOREAD 00004 /* read by other */
3110 #define TOWRITE 00002 /* write by other */
3111 #define TOEXEC 00001 /* execute/search by other */
3113 /* tar Header Block, GNU extensions. */
3115 /* In GNU tar, SYMTYPE is for to symbolic links, and CONTTYPE is for
3116 contiguous files, so maybe disobeying the `reserved' comment in POSIX
3117 header description. I suspect these were meant to be used this way, and
3118 should not have really been `reserved' in the published standards. */
3120 /* *BEWARE* *BEWARE* *BEWARE* that the following information is still
3121 boiling, and may change. Even if the OLDGNU format description should be
3122 accurate, the so-called GNU format is not yet fully decided. It is
3123 surely meant to use only extensions allowed by POSIX, but the sketch
3124 below repeats some ugliness from the OLDGNU format, which should rather
3125 go away. Sparse files should be saved in such a way that they do *not*
3126 require two passes at archive creation time. Huge files get some POSIX
3127 fields to overflow, alternate solutions have to be sought for this. */
3129 /* Descriptor for a single file hole. */
3133 char offset[12]; /* 0 */
3134 char numbytes[12]; /* 12 */
3138 /* Sparse files are not supported in POSIX ustar format. For sparse files
3139 with a POSIX header, a GNU extra header is provided which holds overall
3140 sparse information and a few sparse descriptors. When an old GNU header
3141 replaces both the POSIX header and the GNU extra header, it holds some
3142 sparse descriptors too. Whether POSIX or not, if more sparse descriptors
3143 are still needed, they are put into as many successive sparse headers as
3144 necessary. The following constants tell how many sparse descriptors fit
3145 in each kind of header able to hold them. */
3147 #define SPARSES_IN_EXTRA_HEADER 16
3148 #define SPARSES_IN_OLDGNU_HEADER 4
3149 #define SPARSES_IN_SPARSE_HEADER 21
3151 /* Extension header for sparse files, used immediately after the GNU extra
3152 header, and used only if all sparse information cannot fit into that
3153 extra header. There might even be many such extension headers, one after
3154 the other, until all sparse information has been recorded. */
3156 struct sparse_header
3158 struct sparse sp[SPARSES_IN_SPARSE_HEADER];
3160 char isextended; /* 504 */
3164 /* The old GNU format header conflicts with POSIX format in such a way that
3165 POSIX archives may fool old GNU tar's, and POSIX tar's might well be
3166 fooled by old GNU tar archives. An old GNU format header uses the space
3167 used by the prefix field in a POSIX header, and cumulates information
3168 normally found in a GNU extra header. With an old GNU tar header, we
3169 never see any POSIX header nor GNU extra header. Supplementary sparse
3170 headers are allowed, however. */
3172 struct oldgnu_header
3174 char unused_pad1[345]; /* 0 */
3175 char atime[12]; /* 345 Incr. archive: atime of the file */
3176 char ctime[12]; /* 357 Incr. archive: ctime of the file */
3177 char offset[12]; /* 369 Multivolume archive: the offset of
3178 the start of this volume */
3179 char longnames[4]; /* 381 Not used */
3180 char unused_pad2; /* 385 */
3181 struct sparse sp[SPARSES_IN_OLDGNU_HEADER];
3183 char isextended; /* 482 Sparse file: Extension sparse header
3185 char realsize[12]; /* 483 Sparse file: Real size*/
3189 /* OLDGNU_MAGIC uses both magic and version fields, which are contiguous.
3190 Found in an archive, it indicates an old GNU header format, which will be
3191 hopefully become obsolescent. With OLDGNU_MAGIC, uname and gname are
3192 valid, though the header is not truly POSIX conforming. */
3193 #define OLDGNU_MAGIC "ustar " /* 7 chars and a null */
3195 /* The standards committee allows only capital A through capital Z for
3196 user-defined expansion. Other letters in use include:
3198 'A' Solaris Access Control List
3199 'E' Solaris Extended Attribute File
3200 'I' Inode only, as in 'star'
3201 'N' Obsolete GNU tar, for file names that do not fit into the main header.
3202 'X' POSIX 1003.1-2001 eXtended (VU version) */
3204 /* This is a dir entry that contains the names of files that were in the
3205 dir at the time the dump was made. */
3206 #define GNUTYPE_DUMPDIR 'D'
3208 /* Identifies the *next* file on the tape as having a long linkname. */
3209 #define GNUTYPE_LONGLINK 'K'
3211 /* Identifies the *next* file on the tape as having a long name. */
3212 #define GNUTYPE_LONGNAME 'L'
3214 /* This is the continuation of a file that began on another volume. */
3215 #define GNUTYPE_MULTIVOL 'M'
3217 /* This is for sparse files. */
3218 #define GNUTYPE_SPARSE 'S'
3220 /* This file is a tape/volume header. Ignore it on extraction. */
3221 #define GNUTYPE_VOLHDR 'V'
3223 /* Solaris extended header */
3224 #define SOLARIS_XHDTYPE 'X'
3226 /* Jo"rg Schilling star header */
3230 char name[100]; /* 0 */
3231 char mode[8]; /* 100 */
3232 char uid[8]; /* 108 */
3233 char gid[8]; /* 116 */
3234 char size[12]; /* 124 */
3235 char mtime[12]; /* 136 */
3236 char chksum[8]; /* 148 */
3237 char typeflag; /* 156 */
3238 char linkname[100]; /* 157 */
3239 char magic[6]; /* 257 */
3240 char version[2]; /* 263 */
3241 char uname[32]; /* 265 */
3242 char gname[32]; /* 297 */
3243 char devmajor[8]; /* 329 */
3244 char devminor[8]; /* 337 */
3245 char prefix[131]; /* 345 */
3246 char atime[12]; /* 476 */
3247 char ctime[12]; /* 488 */
3251 #define SPARSES_IN_STAR_HEADER 4
3252 #define SPARSES_IN_STAR_EXT_HEADER 21
3254 struct star_in_header
3256 char fill[345]; /* 0 Everything that is before t_prefix */
3257 char prefix[1]; /* 345 t_name prefix */
3258 char fill2; /* 346 */
3259 char fill3[8]; /* 347 */
3260 char isextended; /* 355 */
3261 struct sparse sp[SPARSES_IN_STAR_HEADER]; /* 356 */
3262 char realsize[12]; /* 452 Actual size of the file */
3263 char offset[12]; /* 464 Offset of multivolume contents */
3264 char atime[12]; /* 476 */
3265 char ctime[12]; /* 488 */
3266 char mfill[8]; /* 500 */
3267 char xmagic[4]; /* 508 "tar" */
3270 struct star_ext_header
3272 struct sparse sp[SPARSES_IN_STAR_EXT_HEADER];
3276 All characters in header blocks are represented by using 8-bit
3277 characters in the local variant of ASCII. Each field within the
3278 structure is contiguous; that is, there is no padding used within the
3279 structure. Each character on the archive medium is stored contiguously.
3281 Bytes representing the contents of files (after the header block of
3282 each file) are not translated in any way and are not constrained to
3283 represent characters in any character set. The `tar' format does not
3284 distinguish text files from binary files, and no translation of file
3285 contents is performed.
3287 The `name', `linkname', `magic', `uname', and `gname' are
3288 null-terminated character strings. All other fields are zero-filled
3289 octal numbers in ASCII. Each numeric field of width W contains W minus
3290 1 digits, and a null.
3292 The `name' field is the file name of the file, with directory names
3293 (if any) preceding the file name, separated by slashes.
3295 The `mode' field provides nine bits specifying file permissions and
3296 three bits to specify the Set UID, Set GID, and Save Text ("sticky")
3297 modes. Values for these bits are defined above. When special
3298 permissions are required to create a file with a given mode, and the
3299 user restoring files from the archive does not hold such permissions,
3300 the mode bit(s) specifying those special permissions are ignored.
3301 Modes which are not supported by the operating system restoring files
3302 from the archive will be ignored. Unsupported modes should be faked up
3303 when creating or updating an archive; e.g., the group permission could
3304 be copied from the _other_ permission.
3306 The `uid' and `gid' fields are the numeric user and group ID of the
3307 file owners, respectively. If the operating system does not support
3308 numeric user or group IDs, these fields should be ignored.
3310 The `size' field is the size of the file in bytes; linked files are
3311 archived with this field specified as zero.
3313 The `mtime' field is the data modification time of the file at the
3314 time it was archived. It is the ASCII representation of the octal
3315 value of the last time the file's contents were modified, represented
3316 as an integer number of seconds since January 1, 1970, 00:00
3317 Coordinated Universal Time.
3319 The `chksum' field is the ASCII representation of the octal value of
3320 the simple sum of all bytes in the header block. Each 8-bit byte in
3321 the header is added to an unsigned integer, initialized to zero, the
3322 precision of which shall be no less than seventeen bits. When
3323 calculating the checksum, the `chksum' field is treated as if it were
3326 The `typeflag' field specifies the type of file archived. If a
3327 particular implementation does not recognize or permit the specified
3328 type, the file will be extracted as if it were a regular file. As this
3329 action occurs, `tar' issues a warning to the standard error.
3331 The `atime' and `ctime' fields are used in making incremental
3332 backups; they store, respectively, the particular file's access and
3333 status change times.
3335 The `offset' is used by the `--multi-volume' (`-M') option, when
3336 making a multi-volume archive. The offset is number of bytes into the
3337 file that we need to restart at to continue the file on the next tape,
3338 i.e., where we store the location that a continued file is continued at.
3340 The following fields were added to deal with sparse files. A file
3341 is "sparse" if it takes in unallocated blocks which end up being
3342 represented as zeros, i.e., no useful data. A test to see if a file is
3343 sparse is to look at the number blocks allocated for it versus the
3344 number of characters in the file; if there are fewer blocks allocated
3345 for the file than would normally be allocated for a file of that size,
3346 then the file is sparse. This is the method `tar' uses to detect a
3347 sparse file, and once such a file is detected, it is treated
3348 differently from non-sparse files.
3350 Sparse files are often `dbm' files, or other database-type files
3351 which have data at some points and emptiness in the greater part of the
3352 file. Such files can appear to be very large when an `ls -l' is done
3353 on them, when in truth, there may be a very small amount of important
3354 data contained in the file. It is thus undesirable to have `tar' think
3355 that it must back up this entire file, as great quantities of room are
3356 wasted on empty blocks, which can lead to running out of room on a tape
3357 far earlier than is necessary. Thus, sparse files are dealt with so
3358 that these empty blocks are not written to the tape. Instead, what is
3359 written to the tape is a description, of sorts, of the sparse file:
3360 where the holes are, how big the holes are, and how much data is found
3361 at the end of the hole. This way, the file takes up potentially far
3362 less room on the tape, and when the file is extracted later on, it will
3363 look exactly the way it looked beforehand. The following is a
3364 description of the fields used to handle a sparse file:
3366 The `sp' is an array of `struct sparse'. Each `struct sparse'
3367 contains two 12-character strings which represent an offset into the
3368 file and a number of bytes to be written at that offset. The offset is
3369 absolute, and not relative to the offset in preceding array element.
3371 The header can hold four of these `struct sparse' at the moment; if
3372 more are needed, they are not stored in the header.
3374 The `isextended' flag is set when an `extended_header' is needed to
3375 deal with a file. Note that this means that this flag can only be set
3376 when dealing with a sparse file, and it is only set in the event that
3377 the description of the file will not fit in the allotted room for
3378 sparse structures in the header. In other words, an extended_header is
3381 The `extended_header' structure is used for sparse files which need
3382 more sparse structures than can fit in the header. The header can fit
3383 4 such structures; if more are needed, the flag `isextended' gets set
3384 and the next block is an `extended_header'.
3386 Each `extended_header' structure contains an array of 21 sparse
3387 structures, along with a similar `isextended' flag that the header had.
3388 There can be an indeterminate number of such `extended_header's to
3389 describe a sparse file.
3393 These flags represent a regular file. In order to be compatible
3394 with older versions of `tar', a `typeflag' value of `AREGTYPE'
3395 should be silently recognized as a regular file. New archives
3396 should be created using `REGTYPE'. Also, for backward
3397 compatibility, `tar' treats a regular file whose name ends with a
3398 slash as a directory.
3401 This flag represents a file linked to another file, of any type,
3402 previously archived. Such files are identified in Unix by each
3403 file having the same device and inode number. The linked-to name
3404 is specified in the `linkname' field with a trailing null.
3407 This represents a symbolic link to another file. The linked-to
3408 name is specified in the `linkname' field with a trailing null.
3412 These represent character special files and block special files
3413 respectively. In this case the `devmajor' and `devminor' fields
3414 will contain the major and minor device numbers respectively.
3415 Operating systems may map the device specifications to their own
3416 local specification, or may ignore the entry.
3419 This flag specifies a directory or sub-directory. The directory
3420 name in the `name' field should end with a slash. On systems where
3421 disk allocation is performed on a directory basis, the `size' field
3422 will contain the maximum number of bytes (which may be rounded to
3423 the nearest disk block allocation unit) which the directory may
3424 hold. A `size' field of zero indicates no such limiting. Systems
3425 which do not support limiting in this manner should ignore the
3429 This specifies a FIFO special file. Note that the archiving of a
3430 FIFO file archives the existence of this file and not its contents.
3433 This specifies a contiguous file, which is the same as a normal
3434 file except that, in operating systems which support it, all its
3435 space is allocated contiguously on the disk. Operating systems
3436 which do not allow contiguous allocation should silently treat this
3437 type as a normal file.
3440 These are reserved for custom implementations. Some of these are
3441 used in the GNU modified format, as described below.
3444 Other values are reserved for specification in future revisions of
3445 the P1003 standard, and should not be used by any `tar' program.
3447 The `magic' field indicates that this archive was output in the
3448 P1003 archive format. If this field contains `TMAGIC', the `uname' and
3449 `gname' fields will contain the ASCII representation of the owner and
3450 group of the file respectively. If found, the user and group IDs are
3451 used rather than the values in the `uid' and `gid' fields.
3453 For references, see ISO/IEC 9945-1:1990 or IEEE Std 1003.1-1990,
3454 pages 169-173 (section 10.1) for `Archive/Interchange File Format'; and
3455 IEEE Std 1003.2-1992, pages 380-388 (section 4.48) and pages 936-940
3456 (section E.4.48) for `pax - Portable archive interchange'.
3459 File: tar.info, Node: Extensions, Next: Sparse Formats, Prev: Standard, Up: Tar Internals
3461 GNU Extensions to the Archive Format
3462 ====================================
3464 _(This message will disappear, once this node revised.)_
3466 The GNU format uses additional file types to describe new types of
3467 files in an archive. These are listed below.
3471 This represents a directory and a list of files created by the
3472 `--incremental' (`-G') option. The `size' field gives the total
3473 size of the associated list of files. Each file name is preceded
3474 by either a `Y' (the file should be in this archive) or an `N'.
3475 (The file is a directory, or is not stored in the archive.) Each
3476 file name is terminated by a null. There is an additional null
3477 after the last file name.
3481 This represents a file continued from another volume of a
3482 multi-volume archive created with the `--multi-volume' (`-M')
3483 option. The original type of the file is not given here. The
3484 `size' field gives the maximum size of this piece of the file
3485 (assuming the volume does not end before the file is written out).
3486 The `offset' field gives the offset from the beginning of the file
3487 where this part of the file begins. Thus `size' plus `offset'
3488 should equal the original size of the file.
3492 This flag indicates that we are dealing with a sparse file. Note
3493 that archiving a sparse file requires special operations to find
3494 holes in the file, which mark the positions of these holes, along
3495 with the number of bytes of data to be found after the hole.
3499 This file type is used to mark the volume header that was given
3500 with the `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') option when
3501 the archive was created. The `name' field contains the `name'
3502 given after the `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL')
3503 option. The `size' field is zero. Only the first file in each
3504 volume of an archive should have this type.
3507 You may have trouble reading a GNU format archive on a non-GNU
3508 system if the options `--incremental' (`-G'), `--multi-volume' (`-M'),
3509 `--sparse' (`-S'), or `--label=ARCHIVE-LABEL' (`-V ARCHIVE-LABEL') were
3510 used when writing the archive. In general, if `tar' does not use the
3511 GNU-added fields of the header, other versions of `tar' should be able
3512 to read the archive. Otherwise, the `tar' program will give an error,
3513 the most likely one being a checksum error.
3516 File: tar.info, Node: Sparse Formats, Next: Snapshot Files, Prev: Extensions, Up: Tar Internals
3518 Storing Sparse Files
3519 ====================
3521 The notion of sparse file, and the ways of handling it from the point
3522 of view of GNU `tar' user have been described in detail in *note
3523 sparse::. This chapter describes the internal format GNU `tar' uses to
3526 The support for sparse files in GNU `tar' has a long history. The
3527 earliest version featuring this support that I was able to find was
3528 1.09, released in November, 1990. The format introduced back then is
3529 called "old GNU" sparse format and in spite of the fact that its design
3530 contained many flaws, it was the only format GNU `tar' supported until
3531 version 1.14 (May, 2004), which introduced initial support for sparse
3532 archives in PAX archives (*note posix::). This format was not free
3533 from design flaws, either and it was subsequently improved in versions
3534 1.15.2 (November, 2005) and 1.15.92 (June, 2006).
3536 In addition to GNU sparse format, GNU `tar' is able to read and
3537 extract sparse files archived by `star'.
3539 The following subsections describe each format in detail.
3544 * PAX 0:: PAX Format, Versions 0.0 and 0.1
3545 * PAX 1:: PAX Format, Version 1.0
3548 File: tar.info, Node: Old GNU Format, Next: PAX 0, Up: Sparse Formats
3550 D.0.1 Old GNU Format
3551 --------------------
3553 The format introduced in November 1990 (v. 1.09) was designed on top of
3554 standard `ustar' headers in such an unfortunate way that some of its
3555 fields overwrote fields required by POSIX.
3557 An old GNU sparse header is designated by type `S'
3558 (`GNUTYPE_SPARSE') and has the following layout:
3560 Offset Size Name Data type Contents
3561 ----------------------------------------------------------------------------
3563 345 12 atime Number `atime' of the file.
3564 357 12 ctime Number `ctime' of the file .
3565 369 12 offset Number For multivolume archives:
3566 the offset of the start of
3570 386 96 sp `sparse_header'(4 entries) File map.
3571 482 1 isextended Bool `1' if an extension sparse
3574 483 12 realsize Number Real size of the file.
3576 Each of `sparse_header' object at offset 386 describes a single data
3577 chunk. It has the following structure:
3579 Offset Size Data type Contents
3580 ---------------------------------------------------------------------------
3581 0 12 Number Offset of the beginning of the chunk.
3582 12 12 Number Size of the chunk.
3584 If the member contains more than four chunks, the `isextended' field
3585 of the header has the value `1' and the main header is followed by one
3586 or more "extension headers". Each such header has the following
3589 Offset Size Name Data type Contents
3590 ----------------------------------------------------------------------------
3591 0 21 sp `sparse_header' (21 entries) File map.
3592 504 1 isextended Bool `1' if an extension sparse
3593 header follows, or `0'
3596 A header with `isextended=0' ends the map.
3599 File: tar.info, Node: PAX 0, Next: PAX 1, Prev: Old GNU Format, Up: Sparse Formats
3601 D.0.2 PAX Format, Versions 0.0 and 0.1
3602 --------------------------------------
3604 There are two formats available in this branch. The version `0.0' is
3605 the initial version of sparse format used by `tar' versions
3606 1.14-1.15.1. The sparse file map is kept in extended (`x') PAX header
3610 Real size of the stored file;
3612 `GNU.sparse.numblocks'
3613 Number of blocks in the sparse map;
3616 Offset of the data block;
3618 `GNU.sparse.numbytes'
3619 Size of the data block.
3621 The latter two variables repeat for each data block, so the overall
3622 structure is like this:
3624 GNU.sparse.size=SIZE
3625 GNU.sparse.numblocks=NUMBLOCKS
3626 repeat NUMBLOCKS times
3627 GNU.sparse.offset=OFFSET
3628 GNU.sparse.numbytes=NUMBYTES
3631 This format presented the following two problems:
3633 1. Whereas the POSIX specification allows a variable to appear
3634 multiple times in a header, it requires that only the last
3635 occurrence be meaningful. Thus, multiple occurrences of
3636 `GNU.sparse.offset' and `GNU.sparse.numbytes' are conflicting with
3639 2. Attempting to extract such archives using a third-party's `tar'
3640 results in extraction of sparse files in _condensed form_. If the
3641 `tar' implementation in question does not support POSIX format, it
3642 will also extract a file containing extension header attributes.
3643 This file can be used to expand the file to its original state.
3644 However, posix-aware `tar's will usually ignore the unknown
3645 variables, which makes restoring the file more difficult. *Note
3646 Extraction of sparse members in v.0.0 format: extracting sparse
3647 v.0.x, for the detailed description of how to restore such members
3648 using non-GNU `tar's.
3650 GNU `tar' 1.15.2 introduced sparse format version `0.1', which
3651 attempted to solve these problems. As its predecessor, this format
3652 stores sparse map in the extended POSIX header. It retains
3653 `GNU.sparse.size' and `GNU.sparse.numblocks' variables, but instead of
3654 `GNU.sparse.offset'/`GNU.sparse.numbytes' pairs it uses a single
3658 Map of non-null data chunks. It is a string consisting of
3659 comma-separated values "OFFSET,SIZE[,OFFSET-1,SIZE-1...]"
3661 To address the 2nd problem, the `name' field in `ustar' is replaced
3662 with a special name, constructed using the following pattern:
3664 %d/GNUSparseFile.%p/%f
3666 The real name of the sparse file is stored in the variable
3667 `GNU.sparse.name'. Thus, those `tar' implementations that are not
3668 aware of GNU extensions will at least extract the files into separate
3669 directories, giving the user a possibility to expand it afterwards.
3670 *Note Extraction of sparse members in v.0.1 format: extracting sparse
3671 v.0.x, for the detailed description of how to restore such members
3672 using non-GNU `tar's.
3674 The resulting `GNU.sparse.map' string can be _very_ long. Although
3675 POSIX does not impose any limit on the length of a `x' header variable,
3676 this possibly can confuse some `tar's.
3679 File: tar.info, Node: PAX 1, Prev: PAX 0, Up: Sparse Formats
3681 D.0.3 PAX Format, Version 1.0
3682 -----------------------------
3684 The version `1.0' of sparse format was introduced with GNU `tar'
3685 1.15.92. Its main objective was to make the resulting file extractable
3686 with little effort even by non-posix aware `tar' implementations.
3687 Starting from this version, the extended header preceding a sparse
3688 member always contains the following variables that identify the format
3697 The `name' field in `ustar' header contains a special name,
3698 constructed using the following pattern:
3700 %d/GNUSparseFile.%p/%f
3702 The real name of the sparse file is stored in the variable
3703 `GNU.sparse.name'. The real size of the file is stored in the variable
3704 `GNU.sparse.realsize'.
3706 The sparse map itself is stored in the file data block, preceding
3707 the actual file data. It consists of a series of octal numbers of
3708 arbitrary length, delimited by newlines. The map is padded with nulls
3709 to the nearest block boundary.
3711 The first number gives the number of entries in the map. Following
3712 are map entries, each one consisting of two numbers giving the offset
3713 and size of the data block it describes.
3715 The format is designed in such a way that non-posix aware `tar's and
3716 `tar's not supporting `GNU.sparse.*' keywords will extract each sparse
3717 file in its condensed form with the file map prepended and will place it
3718 into a separate directory. Then, using a simple program it would be
3719 possible to expand the file to its original form even without GNU `tar'.
3720 *Note Sparse Recovery::, for the detailed information on how to extract
3721 sparse members without GNU `tar'.
3724 File: tar.info, Node: Snapshot Files, Next: Dumpdir, Prev: Sparse Formats, Up: Tar Internals
3726 Format of the Incremental Snapshot Files
3727 ========================================
3729 A "snapshot file" (or "directory file") is created during incremental
3730 backups (*note Incremental Dumps::). It contains the status of the
3731 file system at the time of the dump and is used to determine which
3732 files were modified since the last backup.
3734 GNU `tar' version 1.23 supports three snapshot file formats. The
3735 first format, called "format 0", is the one used by GNU `tar' versions
3736 up to 1.15.1. The second format, called "format 1" is an extended
3737 version of this format, that contains more metadata and allows for
3738 further extensions. It was used by version 1.15.1. Starting from
3739 version 1.16 and up to 1.23, the "format 2" is used.
3741 GNU `tar' is able to read all three formats, but will create
3742 snapshots only in format 2.
3744 This appendix describes all three formats in detail.
3746 0. `Format 0' snapshot file begins with a line containing a decimal
3747 number that represents a UNIX timestamp of the beginning of the
3748 last archivation. This line is followed by directory metadata
3749 descriptions, one per line. Each description has the following
3757 A single plus character (`+'), if this directory is located on
3758 an NFS-mounted partition, or a single space otherwise;
3761 Device number of the directory;
3764 I-node number of the directory;
3767 Name of the directory. Any special characters (white-space,
3768 backslashes, etc.) are quoted.
3770 1. `Format 1' snapshot file begins with a line specifying the
3771 format of the file. This line has the following structure:
3773 `GNU tar-'TAR-VERSION`-'INCR-FORMAT-VERSION
3775 where TAR-VERSION is the version number of GNU `tar'
3776 implementation that created this snapshot, and INCR-FORMAT-VERSION
3777 is the version number of the snapshot format (in this case `1').
3779 Next line contains two decimal numbers, representing the time of
3780 the last backup. First number is the number of seconds, the second
3781 one is the number of nanoseconds, since the beginning of the epoch.
3783 Lines that follow contain directory metadata, one line per
3784 directory. Each line is formatted as follows:
3786 [NFS]MTIME-SEC MTIME-NSEC DEV INODE NAME
3788 where MTIME-SEC and MTIME-NSEC represent last modification time of
3789 this directory with nanosecond precision; NFS, DEV, INODE and NAME
3790 have the same meaning as with `format 0'.
3792 2. `Format 2' snapshot file begins with a format identifier, as
3793 described for version 1, e.g.:
3797 This line is followed by newline. Rest of file consists of
3798 records, separated by null (ASCII 0) characters. Thus, in contrast
3799 to the previous formats, format 2 snapshot is a binary file.
3801 First two records are decimal numbers, representing the time of
3802 the last backup. First number is the number of seconds, the
3803 second one is the number of nanoseconds, since the beginning of the
3804 epoch. These are followed by arbitrary number of directory
3807 Each "directory record" contains a set of metadata describing a
3808 particular directory. Parts of a directory record are delimited
3809 with ASCII 0 characters. The following table describes each part.
3810 The "Number" type in this table stands for a decimal number in
3813 Field Type Description
3814 ---------------------------------------------------------------------
3815 nfs Character `1' if the directory is located on an
3816 NFS-mounted partition, or `0' otherwise;
3817 mtime-sec Number Modification time, seconds;
3818 mtime-nano Number Modification time, nanoseconds;
3819 dev-no Number Device number;
3820 i-no Number I-node number;
3821 name String Directory name; in contrast to the
3822 previous versions it is not quoted;
3823 contents Dumpdir Contents of the directory; *Note
3824 Dumpdir::, for a description of its
3828 Dumpdirs stored in snapshot files contain only records of types
3833 File: tar.info, Node: Dumpdir, Prev: Snapshot Files, Up: Tar Internals
3838 Incremental archives keep information about contents of each dumped
3839 directory in special data blocks called "dumpdirs".
3841 Dumpdir is a sequence of entries of the following form:
3845 where C is one of the "control codes" described below, FILENAME is the
3846 name of the file C operates upon, and `\0' represents a nul character
3847 (ASCII 0). The white space characters were added for readability, real
3848 dumpdirs do not contain them.
3850 Each dumpdir ends with a single nul character.
3852 The following table describes control codes and their meanings:
3855 FILENAME is contained in the archive.
3858 FILENAME was present in the directory at the time the archive was
3859 made, yet it was not dumped to the archive, because it had not
3860 changed since the last backup.
3863 FILENAME is a directory.
3866 This code requests renaming of the FILENAME to the name specified
3867 with the `T' command, that immediately follows it.
3870 Specify target file name for `R' command (see below).
3873 Specify "temporary directory" name for a rename operation (see
3876 Codes `Y', `N' and `D' require FILENAME argument to be a relative
3877 file name to the directory this dumpdir describes, whereas codes `R',
3878 `T' and `X' require their argument to be an absolute file name.
3880 The three codes `R', `T' and `X' specify a "renaming operation". In
3881 the simplest case it is:
3883 R`source'\0T`dest'\0
3885 which means "rename file `source' to file `dest'".
3887 However, there are cases that require using a "temporary directory".
3888 For example, consider the following scenario:
3890 1. Previous run dumped a directory `foo' which contained the
3891 following three directories:
3897 2. They were renamed _cyclically_, so that:
3903 3. New incremental dump was made.
3905 This case cannot be handled by three successive renames, since
3906 renaming `a' to `b' will destroy the existing directory. To correctly
3907 process it, GNU `tar' needs a temporary directory, so it creates the
3908 following dumpdir (newlines have been added for readability):
3916 The first command, `Xfoo\0', instructs the extractor to create a
3917 temporary directory in the directory `foo'. Second command,
3918 `Rfoo/aT\0', says "rename file `foo/a' to the temporary directory that
3919 has just been created" (empty file name after a command means use
3920 temporary directory). Third and fourth commands work as usual, and,
3921 finally, the last command, `R\0Tfoo/a\0' tells tar to rename the
3922 temporary directory to `foo/a'.
3924 The exact placement of a dumpdir in the archive depends on the
3925 archive format (*note Formats::):
3929 In PAX archives, dumpdir is stored in the extended header of the
3930 corresponding directory, in variable `GNU.dumpdir'.
3932 * GNU and old GNU archives
3934 These formats implement special header type `D', which is similar
3935 to ustar header `5' (directory), except that it precedes a data
3936 block containing the dumpdir.
3939 File: tar.info, Node: Genfile, Next: Free Software Needs Free Documentation, Prev: Tar Internals, Up: Top
3944 This appendix describes `genfile', an auxiliary program used in the GNU
3945 tar testsuite. If you are not interested in developing GNU tar, skip
3948 Initially, `genfile' was used to generate data files for the
3949 testsuite, hence its name. However, new operation modes were being
3950 implemented as the testsuite grew more sophisticated, and now `genfile'
3951 is a multi-purpose instrument.
3953 There are three basic operation modes:
3956 This is the default mode. In this mode, `genfile' generates data
3960 In this mode `genfile' displays status of specified files.
3962 Synchronous Execution.
3963 In this mode `genfile' executes the given program with
3964 `--checkpoint' option and executes a set of actions when specified
3965 checkpoints are reached.
3969 * Generate Mode:: File Generation Mode.
3970 * Status Mode:: File Status Mode.
3971 * Exec Mode:: Synchronous Execution mode.
3974 File: tar.info, Node: Generate Mode, Next: Status Mode, Up: Genfile
3979 In this mode `genfile' creates a data file for the test suite. The size
3980 of the file is given with the `--length' (`-l') option. By default the
3981 file contents is written to the standard output, this can be changed
3982 using `--file' (`-f') command line option. Thus, the following two
3983 commands are equivalent:
3985 genfile --length 100 > outfile
3986 genfile --length 100 --file outfile
3988 If `--length' is not given, `genfile' will generate an empty
3991 The command line option `--seek=N' istructs `genfile' to skip the
3992 given number of bytes (N) in the output file before writing to it. It
3993 is similar to the `seek=N' of the `dd' utility.
3995 You can instruct `genfile' to create several files at one go, by
3996 giving it `--files-from' (`-T') option followed by a name of file
3997 containing a list of file names. Using dash (`-') instead of the file
3998 name causes `genfile' to read file list from the standard input. For
4001 # Read file names from file `file.list'
4002 genfile --files-from file.list
4003 # Read file names from standard input
4004 genfile --files-from -
4006 The list file is supposed to contain one file name per line. To use
4007 file lists separated by ASCII NUL character, use `--null' (`-0')
4008 command line option:
4010 genfile --null --files-from file.list
4012 The default data pattern for filling the generated file consists of
4013 first 256 letters of ASCII code, repeated enough times to fill the
4014 entire file. This behavior can be changed with `--pattern' option. This
4015 option takes a mandatory argument, specifying pattern name to use.
4016 Currently two patterns are implemented:
4019 The default pattern as described above.
4022 Fills the file with zeroes.
4024 If no file name was given, the program exits with the code `0'.
4025 Otherwise, it exits with `0' only if it was able to create a file of
4026 the specified length.
4028 Special option `--sparse' (`-s') instructs `genfile' to create a
4029 sparse file. Sparse files consist of "data fragments", separated by
4030 "holes" or blocks of zeros. On many operating systems, actual disk
4031 storage is not allocated for holes, but they are counted in the length
4032 of the file. To create a sparse file, `genfile' should know where to
4033 put data fragments, and what data to use to fill them. So, when
4034 `--sparse' is given the rest of the command line specifies a so-called
4037 The file map consists of any number of "fragment descriptors". Each
4038 descriptor is composed of two values: a number, specifying fragment
4039 offset from the end of the previous fragment or, for the very first
4040 fragment, from the beginning of the file, and "contents string", i.e.,
4041 a string of characters, specifying the pattern to fill the fragment
4042 with. File offset can be suffixed with the following quantifiers:
4046 The number is expressed in kilobytes.
4050 The number is expressed in megabytes.
4054 The number is expressed in gigabytes.
4056 For each letter in contents string `genfile' will generate a "block"
4057 of data, filled with this letter and will write it to the fragment. The
4058 size of block is given by `--block-size' option. It defaults to 512.
4059 Thus, if the string consists of N characters, the resulting file
4060 fragment will contain `N*BLOCK-SIZE' of data.
4062 Last fragment descriptor can have only file offset part. In this
4063 case `genfile' will create a hole at the end of the file up to the
4066 For example, consider the following invocation:
4068 genfile --sparse --file sparsefile 0 ABCD 1M EFGHI 2000K
4070 It will create 3101184-bytes long file of the following structure:
4072 Offset Length Contents
4073 0 4*512=2048 Four 512-byte blocks, filled
4074 with letters `A', `B', `C' and
4076 2048 1046528 Zero bytes
4077 1050624 5*512=2560 Five blocks, filled with letters
4078 `E', `F', `G', `H', `I'.
4079 1053184 2048000 Zero bytes
4081 The exit code of `genfile --status' command is `0' only if created
4082 file is actually sparse.
4085 File: tar.info, Node: Status Mode, Next: Exec Mode, Prev: Generate Mode, Up: Genfile
4090 In status mode, `genfile' prints file system status for each file
4091 specified in the command line. This mode is toggled by `--stat' (`-S')
4092 command line option. An optional argument to this option specifies
4093 output "format": a comma-separated list of `struct stat' fields to be
4094 displayed. This list can contain following identifiers :
4101 Device number in decimal.
4109 File mode in octal. Optional NUMBER specifies octal mask to be
4110 applied to the mode before outputting. For example, `--stat
4111 mode.777' will preserve lower nine bits of it. Notice, that you
4112 can use any punctuation character in place of `.'.
4116 Number of hard links.
4128 File size in decimal.
4132 The size in bytes of each file block.
4136 Number of blocks allocated.
4140 Time of last access.
4144 Time of last modification
4148 Time of last status change
4151 A boolean value indicating whether the file is `sparse'.
4153 Modification times are displayed in UTC as UNIX timestamps, unless
4154 suffixed with `H' (for "human-readable"), as in `ctimeH', in which case
4155 usual `tar tv' output format is used.
4157 The default output format is: `name,dev,ino,mode,
4158 nlink,uid,gid,size,blksize,blocks,atime,mtime,ctime'.
4160 For example, the following command will display file names and
4161 corresponding times of last access for each file in the current working
4164 genfile --stat=name,atime *
4167 File: tar.info, Node: Exec Mode, Prev: Status Mode, Up: Genfile
4172 This mode is designed for testing the behavior of `paxutils' commands
4173 when some of the files change during archiving. It is an experimental
4176 The `Exec Mode' is toggled by `--run' command line option (or its
4177 alias `-r'). The non-optional arguments to `getopt' give the command
4178 line to be executed. Normally, it should contain at least the
4179 `--checkpoint' option.
4181 A set of options is provided for defining checkpoint values and
4182 actions to be executed upon reaching them. Checkpoint values are
4183 introduced with the `--checkpoint' command line option. Argument to
4184 this option is the number of checkpoint in decimal.
4186 Any number of "actions" may be specified after a checkpoint.
4187 Available actions are
4191 Truncate FILE to the size specified by previous `--length' option
4192 (or 0, if it is not given).
4195 Append data to FILE. The size of data and its pattern are given by
4196 previous `--length' and `pattern' options.
4199 Update the access and modification times of FILE. These timestamps
4200 are changed to the current time, unless `--date' option was given,
4201 in which case they are changed to the specified time. Argument to
4202 `--date' option is a date specification in an almost arbitrary
4203 format (*note Date input formats::).
4206 Execute given shell command.
4211 Option `--verbose' instructs `genfile' to print on standard output
4212 notifications about checkpoints being executed and to verbosely
4213 describe exit status of the command.
4215 While the command is being executed its standard output remains
4216 connected to descriptor 1. All messages it prints to file descriptor 2,
4217 except checkpoint notifications, are forwarded to standard error.
4219 `Genfile' exits with the exit status of the executed command.
4221 For compatibility with previous `genfile' versions, the `--run'
4222 option takes an optional argument. If used this way, its argument
4223 supplies the command line to be executed. There should be no
4224 non-optional arguments in the `genfile' command line.
4226 The actual command line is constructed by inserting the
4227 `--checkpoint' option between the command name and its first argument
4228 (if any). Due to this, the argument to `--run' may not use traditional
4229 `tar' option syntax, i.e., the following is wrong:
4232 genfile --run='tar cf foo bar'
4234 Use the following syntax instead:
4236 genfile --run='tar -cf foo bar' ACTIONS...
4238 The above command line is equivalent to
4240 genfile ACTIONS... -- tar -cf foo bar
4242 Notice, that the use of compatibility mode is deprecated.
4245 File: tar.info, Node: Free Software Needs Free Documentation, Next: Copying This Manual, Prev: Genfile, Up: Top
4247 Appendix F Free Software Needs Free Documentation
4248 *************************************************
4250 The biggest deficiency in the free software community today is not in
4251 the software--it is the lack of good free documentation that we can
4252 include with the free software. Many of our most important programs do
4253 not come with free reference manuals and free introductory texts.
4254 Documentation is an essential part of any software package; when an
4255 important free software package does not come with a free manual and a
4256 free tutorial, that is a major gap. We have many such gaps today.
4258 Consider Perl, for instance. The tutorial manuals that people
4259 normally use are non-free. How did this come about? Because the
4260 authors of those manuals published them with restrictive terms--no
4261 copying, no modification, source files not available--which exclude
4262 them from the free software world.
4264 That wasn't the first time this sort of thing happened, and it was
4265 far from the last. Many times we have heard a GNU user eagerly
4266 describe a manual that he is writing, his intended contribution to the
4267 community, only to learn that he had ruined everything by signing a
4268 publication contract to make it non-free.
4270 Free documentation, like free software, is a matter of freedom, not
4271 price. The problem with the non-free manual is not that publishers
4272 charge a price for printed copies--that in itself is fine. (The Free
4273 Software Foundation sells printed copies of manuals, too.) The problem
4274 is the restrictions on the use of the manual. Free manuals are
4275 available in source code form, and give you permission to copy and
4276 modify. Non-free manuals do not allow this.
4278 The criteria of freedom for a free manual are roughly the same as for
4279 free software. Redistribution (including the normal kinds of
4280 commercial redistribution) must be permitted, so that the manual can
4281 accompany every copy of the program, both on-line and on paper.
4283 Permission for modification of the technical content is crucial too.
4284 When people modify the software, adding or changing features, if they
4285 are conscientious they will change the manual too--so they can provide
4286 accurate and clear documentation for the modified program. A manual
4287 that leaves you no choice but to write a new manual to document a
4288 changed version of the program is not really available to our community.
4290 Some kinds of limits on the way modification is handled are
4291 acceptable. For example, requirements to preserve the original
4292 author's copyright notice, the distribution terms, or the list of
4293 authors, are ok. It is also no problem to require modified versions to
4294 include notice that they were modified. Even entire sections that may
4295 not be deleted or changed are acceptable, as long as they deal with
4296 nontechnical topics (like this one). These kinds of restrictions are
4297 acceptable because they don't obstruct the community's normal use of
4300 However, it must be possible to modify all the _technical_ content
4301 of the manual, and then distribute the result in all the usual media,
4302 through all the usual channels. Otherwise, the restrictions obstruct
4303 the use of the manual, it is not free, and we need another manual to
4306 Please spread the word about this issue. Our community continues to
4307 lose manuals to proprietary publishing. If we spread the word that
4308 free software needs free reference manuals and free tutorials, perhaps
4309 the next person who wants to contribute by writing documentation will
4310 realize, before it is too late, that only free manuals contribute to
4311 the free software community.
4313 If you are writing documentation, please insist on publishing it
4314 under the GNU Free Documentation License or another free documentation
4315 license. Remember that this decision requires your approval--you don't
4316 have to let the publisher decide. Some commercial publishers will use
4317 a free license if you insist, but they will not propose the option; it
4318 is up to you to raise the issue and say firmly that this is what you
4319 want. If the publisher you are dealing with refuses, please try other
4320 publishers. If you're not sure whether a proposed license is free,
4321 write to <licensing@gnu.org>.
4323 You can encourage commercial publishers to sell more free, copylefted
4324 manuals and tutorials by buying them, and particularly by buying copies
4325 from the publishers that paid for their writing or for major
4326 improvements. Meanwhile, try to avoid buying non-free documentation at
4327 all. Check the distribution terms of a manual before you buy it, and
4328 insist that whoever seeks your business must respect your freedom.
4329 Check the history of the book, and try reward the publishers that have
4330 paid or pay the authors to work on it.
4332 The Free Software Foundation maintains a list of free documentation
4333 published by other publishers, at
4334 `http://www.fsf.org/doc/other-free-books.html'.
4337 File: tar.info, Node: Copying This Manual, Next: Index of Command Line Options, Prev: Free Software Needs Free Documentation, Up: Top
4339 Appendix G Copying This Manual
4340 ******************************
4344 * GNU Free Documentation License:: License for copying this manual
4347 File: tar.info, Node: GNU Free Documentation License, Up: Copying This Manual
4349 G.1 GNU Free Documentation License
4350 ==================================
4352 Version 1.2, November 2002
4354 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
4355 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
4357 Everyone is permitted to copy and distribute verbatim copies
4358 of this license document, but changing it is not allowed.
4362 The purpose of this License is to make a manual, textbook, or other
4363 functional and useful document "free" in the sense of freedom: to
4364 assure everyone the effective freedom to copy and redistribute it,
4365 with or without modifying it, either commercially or
4366 noncommercially. Secondarily, this License preserves for the
4367 author and publisher a way to get credit for their work, while not
4368 being considered responsible for modifications made by others.
4370 This License is a kind of "copyleft", which means that derivative
4371 works of the document must themselves be free in the same sense.
4372 It complements the GNU General Public License, which is a copyleft
4373 license designed for free software.
4375 We have designed this License in order to use it for manuals for
4376 free software, because free software needs free documentation: a
4377 free program should come with manuals providing the same freedoms
4378 that the software does. But this License is not limited to
4379 software manuals; it can be used for any textual work, regardless
4380 of subject matter or whether it is published as a printed book.
4381 We recommend this License principally for works whose purpose is
4382 instruction or reference.
4384 1. APPLICABILITY AND DEFINITIONS
4386 This License applies to any manual or other work, in any medium,
4387 that contains a notice placed by the copyright holder saying it
4388 can be distributed under the terms of this License. Such a notice
4389 grants a world-wide, royalty-free license, unlimited in duration,
4390 to use that work under the conditions stated herein. The
4391 "Document", below, refers to any such manual or work. Any member
4392 of the public is a licensee, and is addressed as "you". You
4393 accept the license if you copy, modify or distribute the work in a
4394 way requiring permission under copyright law.
4396 A "Modified Version" of the Document means any work containing the
4397 Document or a portion of it, either copied verbatim, or with
4398 modifications and/or translated into another language.
4400 A "Secondary Section" is a named appendix or a front-matter section
4401 of the Document that deals exclusively with the relationship of the
4402 publishers or authors of the Document to the Document's overall
4403 subject (or to related matters) and contains nothing that could
4404 fall directly within that overall subject. (Thus, if the Document
4405 is in part a textbook of mathematics, a Secondary Section may not
4406 explain any mathematics.) The relationship could be a matter of
4407 historical connection with the subject or with related matters, or
4408 of legal, commercial, philosophical, ethical or political position
4411 The "Invariant Sections" are certain Secondary Sections whose
4412 titles are designated, as being those of Invariant Sections, in
4413 the notice that says that the Document is released under this
4414 License. If a section does not fit the above definition of
4415 Secondary then it is not allowed to be designated as Invariant.
4416 The Document may contain zero Invariant Sections. If the Document
4417 does not identify any Invariant Sections then there are none.
4419 The "Cover Texts" are certain short passages of text that are
4420 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
4421 that says that the Document is released under this License. A
4422 Front-Cover Text may be at most 5 words, and a Back-Cover Text may
4423 be at most 25 words.
4425 A "Transparent" copy of the Document means a machine-readable copy,
4426 represented in a format whose specification is available to the
4427 general public, that is suitable for revising the document
4428 straightforwardly with generic text editors or (for images
4429 composed of pixels) generic paint programs or (for drawings) some
4430 widely available drawing editor, and that is suitable for input to
4431 text formatters or for automatic translation to a variety of
4432 formats suitable for input to text formatters. A copy made in an
4433 otherwise Transparent file format whose markup, or absence of
4434 markup, has been arranged to thwart or discourage subsequent
4435 modification by readers is not Transparent. An image format is
4436 not Transparent if used for any substantial amount of text. A
4437 copy that is not "Transparent" is called "Opaque".
4439 Examples of suitable formats for Transparent copies include plain
4440 ASCII without markup, Texinfo input format, LaTeX input format,
4441 SGML or XML using a publicly available DTD, and
4442 standard-conforming simple HTML, PostScript or PDF designed for
4443 human modification. Examples of transparent image formats include
4444 PNG, XCF and JPG. Opaque formats include proprietary formats that
4445 can be read and edited only by proprietary word processors, SGML or
4446 XML for which the DTD and/or processing tools are not generally
4447 available, and the machine-generated HTML, PostScript or PDF
4448 produced by some word processors for output purposes only.
4450 The "Title Page" means, for a printed book, the title page itself,
4451 plus such following pages as are needed to hold, legibly, the
4452 material this License requires to appear in the title page. For
4453 works in formats which do not have any title page as such, "Title
4454 Page" means the text near the most prominent appearance of the
4455 work's title, preceding the beginning of the body of the text.
4457 A section "Entitled XYZ" means a named subunit of the Document
4458 whose title either is precisely XYZ or contains XYZ in parentheses
4459 following text that translates XYZ in another language. (Here XYZ
4460 stands for a specific section name mentioned below, such as
4461 "Acknowledgements", "Dedications", "Endorsements", or "History".)
4462 To "Preserve the Title" of such a section when you modify the
4463 Document means that it remains a section "Entitled XYZ" according
4466 The Document may include Warranty Disclaimers next to the notice
4467 which states that this License applies to the Document. These
4468 Warranty Disclaimers are considered to be included by reference in
4469 this License, but only as regards disclaiming warranties: any other
4470 implication that these Warranty Disclaimers may have is void and
4471 has no effect on the meaning of this License.
4475 You may copy and distribute the Document in any medium, either
4476 commercially or noncommercially, provided that this License, the
4477 copyright notices, and the license notice saying this License
4478 applies to the Document are reproduced in all copies, and that you
4479 add no other conditions whatsoever to those of this License. You
4480 may not use technical measures to obstruct or control the reading
4481 or further copying of the copies you make or distribute. However,
4482 you may accept compensation in exchange for copies. If you
4483 distribute a large enough number of copies you must also follow
4484 the conditions in section 3.
4486 You may also lend copies, under the same conditions stated above,
4487 and you may publicly display copies.
4489 3. COPYING IN QUANTITY
4491 If you publish printed copies (or copies in media that commonly
4492 have printed covers) of the Document, numbering more than 100, and
4493 the Document's license notice requires Cover Texts, you must
4494 enclose the copies in covers that carry, clearly and legibly, all
4495 these Cover Texts: Front-Cover Texts on the front cover, and
4496 Back-Cover Texts on the back cover. Both covers must also clearly
4497 and legibly identify you as the publisher of these copies. The
4498 front cover must present the full title with all words of the
4499 title equally prominent and visible. You may add other material
4500 on the covers in addition. Copying with changes limited to the
4501 covers, as long as they preserve the title of the Document and
4502 satisfy these conditions, can be treated as verbatim copying in
4505 If the required texts for either cover are too voluminous to fit
4506 legibly, you should put the first ones listed (as many as fit
4507 reasonably) on the actual cover, and continue the rest onto
4510 If you publish or distribute Opaque copies of the Document
4511 numbering more than 100, you must either include a
4512 machine-readable Transparent copy along with each Opaque copy, or
4513 state in or with each Opaque copy a computer-network location from
4514 which the general network-using public has access to download
4515 using public-standard network protocols a complete Transparent
4516 copy of the Document, free of added material. If you use the
4517 latter option, you must take reasonably prudent steps, when you
4518 begin distribution of Opaque copies in quantity, to ensure that
4519 this Transparent copy will remain thus accessible at the stated
4520 location until at least one year after the last time you
4521 distribute an Opaque copy (directly or through your agents or
4522 retailers) of that edition to the public.
4524 It is requested, but not required, that you contact the authors of
4525 the Document well before redistributing any large number of
4526 copies, to give them a chance to provide you with an updated
4527 version of the Document.
4531 You may copy and distribute a Modified Version of the Document
4532 under the conditions of sections 2 and 3 above, provided that you
4533 release the Modified Version under precisely this License, with
4534 the Modified Version filling the role of the Document, thus
4535 licensing distribution and modification of the Modified Version to
4536 whoever possesses a copy of it. In addition, you must do these
4537 things in the Modified Version:
4539 A. Use in the Title Page (and on the covers, if any) a title
4540 distinct from that of the Document, and from those of
4541 previous versions (which should, if there were any, be listed
4542 in the History section of the Document). You may use the
4543 same title as a previous version if the original publisher of
4544 that version gives permission.
4546 B. List on the Title Page, as authors, one or more persons or
4547 entities responsible for authorship of the modifications in
4548 the Modified Version, together with at least five of the
4549 principal authors of the Document (all of its principal
4550 authors, if it has fewer than five), unless they release you
4551 from this requirement.
4553 C. State on the Title page the name of the publisher of the
4554 Modified Version, as the publisher.
4556 D. Preserve all the copyright notices of the Document.
4558 E. Add an appropriate copyright notice for your modifications
4559 adjacent to the other copyright notices.
4561 F. Include, immediately after the copyright notices, a license
4562 notice giving the public permission to use the Modified
4563 Version under the terms of this License, in the form shown in
4566 G. Preserve in that license notice the full lists of Invariant
4567 Sections and required Cover Texts given in the Document's
4570 H. Include an unaltered copy of this License.
4572 I. Preserve the section Entitled "History", Preserve its Title,
4573 and add to it an item stating at least the title, year, new
4574 authors, and publisher of the Modified Version as given on
4575 the Title Page. If there is no section Entitled "History" in
4576 the Document, create one stating the title, year, authors,
4577 and publisher of the Document as given on its Title Page,
4578 then add an item describing the Modified Version as stated in
4579 the previous sentence.
4581 J. Preserve the network location, if any, given in the Document
4582 for public access to a Transparent copy of the Document, and
4583 likewise the network locations given in the Document for
4584 previous versions it was based on. These may be placed in
4585 the "History" section. You may omit a network location for a
4586 work that was published at least four years before the
4587 Document itself, or if the original publisher of the version
4588 it refers to gives permission.
4590 K. For any section Entitled "Acknowledgements" or "Dedications",
4591 Preserve the Title of the section, and preserve in the
4592 section all the substance and tone of each of the contributor
4593 acknowledgements and/or dedications given therein.
4595 L. Preserve all the Invariant Sections of the Document,
4596 unaltered in their text and in their titles. Section numbers
4597 or the equivalent are not considered part of the section
4600 M. Delete any section Entitled "Endorsements". Such a section
4601 may not be included in the Modified Version.
4603 N. Do not retitle any existing section to be Entitled
4604 "Endorsements" or to conflict in title with any Invariant
4607 O. Preserve any Warranty Disclaimers.
4609 If the Modified Version includes new front-matter sections or
4610 appendices that qualify as Secondary Sections and contain no
4611 material copied from the Document, you may at your option
4612 designate some or all of these sections as invariant. To do this,
4613 add their titles to the list of Invariant Sections in the Modified
4614 Version's license notice. These titles must be distinct from any
4615 other section titles.
4617 You may add a section Entitled "Endorsements", provided it contains
4618 nothing but endorsements of your Modified Version by various
4619 parties--for example, statements of peer review or that the text
4620 has been approved by an organization as the authoritative
4621 definition of a standard.
4623 You may add a passage of up to five words as a Front-Cover Text,
4624 and a passage of up to 25 words as a Back-Cover Text, to the end
4625 of the list of Cover Texts in the Modified Version. Only one
4626 passage of Front-Cover Text and one of Back-Cover Text may be
4627 added by (or through arrangements made by) any one entity. If the
4628 Document already includes a cover text for the same cover,
4629 previously added by you or by arrangement made by the same entity
4630 you are acting on behalf of, you may not add another; but you may
4631 replace the old one, on explicit permission from the previous
4632 publisher that added the old one.
4634 The author(s) and publisher(s) of the Document do not by this
4635 License give permission to use their names for publicity for or to
4636 assert or imply endorsement of any Modified Version.
4638 5. COMBINING DOCUMENTS
4640 You may combine the Document with other documents released under
4641 this License, under the terms defined in section 4 above for
4642 modified versions, provided that you include in the combination
4643 all of the Invariant Sections of all of the original documents,
4644 unmodified, and list them all as Invariant Sections of your
4645 combined work in its license notice, and that you preserve all
4646 their Warranty Disclaimers.
4648 The combined work need only contain one copy of this License, and
4649 multiple identical Invariant Sections may be replaced with a single
4650 copy. If there are multiple Invariant Sections with the same name
4651 but different contents, make the title of each such section unique
4652 by adding at the end of it, in parentheses, the name of the
4653 original author or publisher of that section if known, or else a
4654 unique number. Make the same adjustment to the section titles in
4655 the list of Invariant Sections in the license notice of the
4658 In the combination, you must combine any sections Entitled
4659 "History" in the various original documents, forming one section
4660 Entitled "History"; likewise combine any sections Entitled
4661 "Acknowledgements", and any sections Entitled "Dedications". You
4662 must delete all sections Entitled "Endorsements."
4664 6. COLLECTIONS OF DOCUMENTS
4666 You may make a collection consisting of the Document and other
4667 documents released under this License, and replace the individual
4668 copies of this License in the various documents with a single copy
4669 that is included in the collection, provided that you follow the
4670 rules of this License for verbatim copying of each of the
4671 documents in all other respects.
4673 You may extract a single document from such a collection, and
4674 distribute it individually under this License, provided you insert
4675 a copy of this License into the extracted document, and follow
4676 this License in all other respects regarding verbatim copying of
4679 7. AGGREGATION WITH INDEPENDENT WORKS
4681 A compilation of the Document or its derivatives with other
4682 separate and independent documents or works, in or on a volume of
4683 a storage or distribution medium, is called an "aggregate" if the
4684 copyright resulting from the compilation is not used to limit the
4685 legal rights of the compilation's users beyond what the individual
4686 works permit. When the Document is included in an aggregate, this
4687 License does not apply to the other works in the aggregate which
4688 are not themselves derivative works of the Document.
4690 If the Cover Text requirement of section 3 is applicable to these
4691 copies of the Document, then if the Document is less than one half
4692 of the entire aggregate, the Document's Cover Texts may be placed
4693 on covers that bracket the Document within the aggregate, or the
4694 electronic equivalent of covers if the Document is in electronic
4695 form. Otherwise they must appear on printed covers that bracket
4696 the whole aggregate.
4700 Translation is considered a kind of modification, so you may
4701 distribute translations of the Document under the terms of section
4702 4. Replacing Invariant Sections with translations requires special
4703 permission from their copyright holders, but you may include
4704 translations of some or all Invariant Sections in addition to the
4705 original versions of these Invariant Sections. You may include a
4706 translation of this License, and all the license notices in the
4707 Document, and any Warranty Disclaimers, provided that you also
4708 include the original English version of this License and the
4709 original versions of those notices and disclaimers. In case of a
4710 disagreement between the translation and the original version of
4711 this License or a notice or disclaimer, the original version will
4714 If a section in the Document is Entitled "Acknowledgements",
4715 "Dedications", or "History", the requirement (section 4) to
4716 Preserve its Title (section 1) will typically require changing the
4721 You may not copy, modify, sublicense, or distribute the Document
4722 except as expressly provided for under this License. Any other
4723 attempt to copy, modify, sublicense or distribute the Document is
4724 void, and will automatically terminate your rights under this
4725 License. However, parties who have received copies, or rights,
4726 from you under this License will not have their licenses
4727 terminated so long as such parties remain in full compliance.
4729 10. FUTURE REVISIONS OF THIS LICENSE
4731 The Free Software Foundation may publish new, revised versions of
4732 the GNU Free Documentation License from time to time. Such new
4733 versions will be similar in spirit to the present version, but may
4734 differ in detail to address new problems or concerns. See
4735 `http://www.gnu.org/copyleft/'.
4737 Each version of the License is given a distinguishing version
4738 number. If the Document specifies that a particular numbered
4739 version of this License "or any later version" applies to it, you
4740 have the option of following the terms and conditions either of
4741 that specified version or of any later version that has been
4742 published (not as a draft) by the Free Software Foundation. If
4743 the Document does not specify a version number of this License,
4744 you may choose any version ever published (not as a draft) by the
4745 Free Software Foundation.
4747 G.1.1 ADDENDUM: How to use this License for your documents
4748 ----------------------------------------------------------
4750 To use this License in a document you have written, include a copy of
4751 the License in the document and put the following copyright and license
4752 notices just after the title page:
4754 Copyright (C) YEAR YOUR NAME.
4755 Permission is granted to copy, distribute and/or modify this document
4756 under the terms of the GNU Free Documentation License, Version 1.2
4757 or any later version published by the Free Software Foundation;
4758 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
4759 Texts. A copy of the license is included in the section entitled ``GNU
4760 Free Documentation License''.
4762 If you have Invariant Sections, Front-Cover Texts and Back-Cover
4763 Texts, replace the "with...Texts." line with this:
4765 with the Invariant Sections being LIST THEIR TITLES, with
4766 the Front-Cover Texts being LIST, and with the Back-Cover Texts
4769 If you have Invariant Sections without Cover Texts, or some other
4770 combination of the three, merge those two alternatives to suit the
4773 If your document contains nontrivial examples of program code, we
4774 recommend releasing these examples in parallel under your choice of
4775 free software license, such as the GNU General Public License, to
4776 permit their use in free software.
4779 File: tar.info, Node: Index of Command Line Options, Next: Index, Prev: Copying This Manual, Up: Top
4781 Appendix H Index of Command Line Options
4782 ****************************************
4784 This appendix contains an index of all GNU `tar' long command line
4785 options. The options are listed without the preceding double-dash. For
4786 a cross-reference of short command line options, *note Short Option
4792 * absolute-names: absolute. (line 10)
4793 * absolute-names, summary: Option Summary. (line 6)
4794 * add-file: files. (line 85)
4795 * after-date: after. (line 24)
4796 * after-date, summary: Option Summary. (line 12)
4797 * anchored: controlling pattern-matching.
4799 * anchored, summary: Option Summary. (line 15)
4800 * append <1>: appending files. (line 6)
4801 * append: append. (line 6)
4802 * append, summary: Operation Summary. (line 6)
4803 * atime-preserve: Attributes. (line 10)
4804 * atime-preserve, summary: Option Summary. (line 19)
4805 * auto-compress: gzip. (line 78)
4806 * auto-compress, summary: Option Summary. (line 65)
4807 * backup: backup. (line 41)
4808 * backup, summary: Option Summary. (line 71)
4809 * block-number: verbose. (line 115)
4810 * block-number, summary: Option Summary. (line 76)
4811 * blocking-factor: Blocking Factor. (line 8)
4812 * blocking-factor, summary: Option Summary. (line 82)
4813 * bzip2: gzip. (line 134)
4814 * bzip2, summary: Option Summary. (line 87)
4815 * catenate: concatenate. (line 6)
4816 * catenate, summary: Operation Summary. (line 10)
4817 * check-device, described: Incremental Dumps. (line 108)
4818 * check-device, summary: Option Summary. (line 92)
4819 * check-links, described: hard links. (line 31)
4820 * check-links, summary: Option Summary. (line 143)
4821 * checkpoint: checkpoints. (line 6)
4822 * checkpoint, defined: checkpoints. (line 13)
4823 * checkpoint, summary: Option Summary. (line 97)
4824 * checkpoint-action: checkpoints. (line 6)
4825 * checkpoint-action, defined: checkpoints. (line 22)
4826 * checkpoint-action, summary: Option Summary. (line 105)
4827 * compare: compare. (line 6)
4828 * compare, summary: Operation Summary. (line 14)
4829 * compress: gzip. (line 151)
4830 * compress, summary: Option Summary. (line 152)
4831 * concatenate: concatenate. (line 6)
4832 * concatenate, summary: Operation Summary. (line 20)
4833 * confirmation, summary: Option Summary. (line 159)
4834 * create, additional options: create options. (line 6)
4835 * create, complementary notes: Basic tar. (line 11)
4836 * create, introduced: Creating the archive.
4838 * create, summary: Operation Summary. (line 25)
4839 * create, using with --verbose: create verbose. (line 6)
4840 * create, using with --verify: verify. (line 24)
4841 * delay-directory-restore: Directory Modification Times and Permissions.
4843 * delay-directory-restore, summary: Option Summary. (line 162)
4844 * delete: delete. (line 6)
4845 * delete, summary: Operation Summary. (line 29)
4846 * delete, using before -append: append. (line 47)
4847 * dereference: dereference. (line 6)
4848 * dereference, summary: Option Summary. (line 167)
4849 * diff, summary: Operation Summary. (line 33)
4850 * directory: directory. (line 11)
4851 * directory, summary: Option Summary. (line 173)
4852 * directory, using in --files-from argument: files. (line 60)
4853 * exclude: exclude. (line 6)
4854 * exclude, potential problems with: problems with exclude.
4856 * exclude, summary: Option Summary. (line 180)
4857 * exclude-backups: exclude. (line 82)
4858 * exclude-backups, summary: Option Summary. (line 184)
4859 * exclude-caches: exclude. (line 105)
4860 * exclude-caches, summary: Option Summary. (line 192)
4861 * exclude-caches-all: exclude. (line 113)
4862 * exclude-caches-all, summary: Option Summary. (line 205)
4863 * exclude-caches-under: exclude. (line 109)
4864 * exclude-caches-under, summary: Option Summary. (line 199)
4865 * exclude-from: exclude. (line 6)
4866 * exclude-from, summary: Option Summary. (line 187)
4867 * exclude-tag: exclude. (line 122)
4868 * exclude-tag, summary: Option Summary. (line 209)
4869 * exclude-tag-all: exclude. (line 130)
4870 * exclude-tag-all, summary: Option Summary. (line 219)
4871 * exclude-tag-under: exclude. (line 126)
4872 * exclude-tag-under, summary: Option Summary. (line 214)
4873 * exclude-vcs: exclude. (line 37)
4874 * exclude-vcs, summary: Option Summary. (line 223)
4875 * extract: extract. (line 6)
4876 * extract, additional options: extract options. (line 6)
4877 * extract, complementary notes: Basic tar. (line 48)
4878 * extract, summary: Operation Summary. (line 37)
4879 * extract, using with --listed-incremental: Incremental Dumps.
4881 * file: file. (line 6)
4882 * file, short description: file. (line 15)
4883 * file, summary: Option Summary. (line 229)
4884 * file, tutorial: file tutorial. (line 6)
4885 * files-from: files. (line 14)
4886 * files-from, summary: Option Summary. (line 235)
4887 * force-local, short description: Device. (line 70)
4888 * force-local, summary: Option Summary. (line 241)
4889 * format, summary: Option Summary. (line 246)
4890 * get, summary: Operation Summary. (line 42)
4891 * group: override. (line 75)
4892 * group, summary: Option Summary. (line 271)
4893 * gunzip, summary: Option Summary. (line 279)
4894 * gzip: gzip. (line 100)
4895 * gzip, summary: Option Summary. (line 279)
4896 * hard-dereference, described: hard links. (line 59)
4897 * hard-dereference, summary: Option Summary. (line 287)
4898 * help: help tutorial. (line 6)
4899 * help, introduction: help. (line 27)
4900 * help, summary: Option Summary. (line 293)
4901 * ignore-case: controlling pattern-matching.
4903 * ignore-case, summary: Option Summary. (line 298)
4904 * ignore-command-error: Writing to an External Program.
4906 * ignore-command-error, summary: Option Summary. (line 302)
4907 * ignore-failed-read: Ignore Failed Read. (line 7)
4908 * ignore-failed-read, summary: Option Summary. (line 306)
4909 * ignore-zeros: Ignore Zeros. (line 6)
4910 * ignore-zeros, short description: Blocking Factor. (line 156)
4911 * ignore-zeros, summary: Option Summary. (line 310)
4912 * incremental, summary: Option Summary. (line 315)
4913 * incremental, using with --list: Incremental Dumps. (line 157)
4914 * index-file, summary: Option Summary. (line 322)
4915 * info-script: Multi-Volume Archives.
4917 * info-script, short description: Device. (line 104)
4918 * info-script, summary: Option Summary. (line 325)
4919 * interactive: interactive. (line 14)
4920 * interactive, summary: Option Summary. (line 333)
4921 * keep-newer-files: Keep Newer Files. (line 6)
4922 * keep-newer-files, summary: Option Summary. (line 340)
4923 * keep-old-files: Keep Old Files. (line 6)
4924 * keep-old-files, introduced: Dealing with Old Files.
4926 * keep-old-files, summary: Option Summary. (line 344)
4927 * label <1>: label. (line 8)
4928 * label: Tape Files. (line 6)
4929 * label, summary: Option Summary. (line 349)
4930 * level, described: Incremental Dumps. (line 76)
4931 * level, summary: Option Summary. (line 356)
4932 * list: list. (line 6)
4933 * list, summary: Operation Summary. (line 46)
4934 * list, using with --incremental: Incremental Dumps. (line 159)
4935 * list, using with --listed-incremental: Incremental Dumps. (line 160)
4936 * list, using with --verbose: list. (line 30)
4937 * list, using with file name arguments: list. (line 68)
4938 * listed-incremental, described: Incremental Dumps. (line 14)
4939 * listed-incremental, summary: Option Summary. (line 366)
4940 * listed-incremental, using with --extract: Incremental Dumps.
4942 * listed-incremental, using with --list: Incremental Dumps. (line 158)
4943 * lzip: gzip. (line 142)
4944 * lzip, summary: Option Summary. (line 374)
4945 * lzma: gzip. (line 145)
4946 * lzma, summary: Option Summary. (line 378)
4947 * lzop: gzip. (line 148)
4948 * mode: override. (line 14)
4949 * mode, summary: Option Summary. (line 386)
4950 * mtime: override. (line 29)
4951 * mtime, summary: Option Summary. (line 392)
4952 * multi-volume: Multi-Volume Archives.
4954 * multi-volume, short description: Device. (line 88)
4955 * multi-volume, summary: Option Summary. (line 401)
4956 * new-volume-script: Multi-Volume Archives.
4958 * new-volume-script, short description: Device. (line 104)
4959 * new-volume-script, summary: Option Summary. (line 325)
4960 * newer: after. (line 24)
4961 * newer, summary: Option Summary. (line 409)
4962 * newer-mtime: after. (line 35)
4963 * newer-mtime, summary: Option Summary. (line 417)
4964 * no-anchored: controlling pattern-matching.
4966 * no-anchored, summary: Option Summary. (line 422)
4967 * no-auto-compress, summary: Option Summary. (line 426)
4968 * no-check-device, described: Incremental Dumps. (line 104)
4969 * no-check-device, summary: Option Summary. (line 430)
4970 * no-delay-directory-restore: Directory Modification Times and Permissions.
4972 * no-delay-directory-restore, summary: Option Summary. (line 435)
4973 * no-ignore-case: controlling pattern-matching.
4975 * no-ignore-case, summary: Option Summary. (line 441)
4976 * no-ignore-command-error: Writing to an External Program.
4978 * no-ignore-command-error, summary: Option Summary. (line 444)
4979 * no-null, described: nul. (line 15)
4980 * no-null, summary: Option Summary. (line 448)
4981 * no-overwrite-dir, summary: Option Summary. (line 453)
4982 * no-quote-chars, summary: Option Summary. (line 457)
4983 * no-recursion: recurse. (line 11)
4984 * no-recursion, summary: Option Summary. (line 462)
4985 * no-same-owner: Attributes. (line 63)
4986 * no-same-owner, summary: Option Summary. (line 466)
4987 * no-same-permissions, summary: Option Summary. (line 472)
4988 * no-seek, summary: Option Summary. (line 477)
4989 * no-unquote: Selecting Archive Members.
4991 * no-unquote, summary: Option Summary. (line 482)
4992 * no-wildcards: controlling pattern-matching.
4994 * no-wildcards, summary: Option Summary. (line 486)
4995 * no-wildcards-match-slash: controlling pattern-matching.
4997 * no-wildcards-match-slash, summary: Option Summary. (line 489)
4998 * null, described: nul. (line 11)
4999 * null, summary: Option Summary. (line 492)
5000 * numeric-owner: Attributes. (line 69)
5001 * numeric-owner, summary: Option Summary. (line 498)
5002 * occurrence, described: append. (line 34)
5003 * occurrence, summary: Option Summary. (line 515)
5004 * old-archive, summary: Option Summary. (line 529)
5005 * one-file-system: one. (line 14)
5006 * one-file-system, summary: Option Summary. (line 532)
5007 * overwrite: Overwrite Old Files. (line 6)
5008 * overwrite, introduced: Dealing with Old Files.
5010 * overwrite, summary: Option Summary. (line 537)
5011 * overwrite-dir: Overwrite Old Files. (line 28)
5012 * overwrite-dir, introduced: Dealing with Old Files.
5014 * overwrite-dir, summary: Option Summary. (line 541)
5015 * owner: override. (line 57)
5016 * owner, summary: Option Summary. (line 545)
5017 * pax-option: PAX keywords. (line 6)
5018 * pax-option, summary: Option Summary. (line 554)
5019 * portability, summary: Option Summary. (line 560)
5020 * posix, summary: Option Summary. (line 564)
5021 * preserve: Attributes. (line 122)
5022 * preserve, summary: Option Summary. (line 567)
5023 * preserve-order: Same Order. (line 6)
5024 * preserve-order, summary: Option Summary. (line 571)
5025 * preserve-permissions: Setting Access Permissions.
5027 * preserve-permissions, short description: Attributes. (line 109)
5028 * preserve-permissions, summary: Option Summary. (line 574)
5029 * quote-chars, summary: Option Summary. (line 584)
5030 * quoting-style: quoting styles. (line 38)
5031 * quoting-style, summary: Option Summary. (line 588)
5032 * read-full-records <1>: read full records. (line 6)
5033 * read-full-records: Reading. (line 6)
5034 * read-full-records, short description: Blocking Factor. (line 172)
5035 * read-full-records, summary: Option Summary. (line 595)
5036 * record-size, summary: Option Summary. (line 600)
5037 * recursion: recurse. (line 22)
5038 * recursion, summary: Option Summary. (line 604)
5039 * recursive-unlink: Recursive Unlink. (line 6)
5040 * recursive-unlink, summary: Option Summary. (line 608)
5041 * remove-files: remove files. (line 6)
5042 * remove-files, summary: Option Summary. (line 613)
5043 * restrict, summary: Option Summary. (line 617)
5044 * rmt-command, summary: Option Summary. (line 622)
5045 * rsh-command: Device. (line 73)
5046 * rsh-command, summary: Option Summary. (line 626)
5047 * same-order: Same Order. (line 6)
5048 * same-order, summary: Option Summary. (line 630)
5049 * same-owner: Attributes. (line 44)
5050 * same-owner, summary: Option Summary. (line 638)
5051 * same-permissions: Setting Access Permissions.
5053 * same-permissions, short description: Attributes. (line 109)
5054 * same-permissions, summary: Option Summary. (line 574)
5055 * seek, summary: Option Summary. (line 647)
5056 * show-defaults: defaults. (line 6)
5057 * show-defaults, summary: Option Summary. (line 656)
5058 * show-omitted-dirs: verbose. (line 107)
5059 * show-omitted-dirs, summary: Option Summary. (line 668)
5060 * show-stored-names: list. (line 60)
5061 * show-stored-names, summary: Option Summary. (line 672)
5062 * show-transformed-names: transform. (line 45)
5063 * show-transformed-names, summary: Option Summary. (line 672)
5064 * sparse: sparse. (line 22)
5065 * sparse, summary: Option Summary. (line 680)
5066 * sparse-version: sparse. (line 57)
5067 * sparse-version, summary: Option Summary. (line 685)
5068 * starting-file: Starting File. (line 6)
5069 * starting-file, summary: Option Summary. (line 690)
5070 * strip-components: transform. (line 25)
5071 * strip-components, summary: Option Summary. (line 696)
5072 * suffix: backup. (line 68)
5073 * suffix, summary: Option Summary. (line 705)
5074 * tape-length: Multi-Volume Archives.
5076 * tape-length, short description: Device. (line 96)
5077 * tape-length, summary: Option Summary. (line 709)
5078 * test-label: label. (line 37)
5079 * test-label, summary: Option Summary. (line 714)
5080 * to-command: Writing to an External Program.
5082 * to-command, summary: Option Summary. (line 718)
5083 * to-stdout: Writing to Standard Output.
5085 * to-stdout, summary: Option Summary. (line 722)
5086 * totals: verbose. (line 46)
5087 * totals, summary: Option Summary. (line 727)
5088 * touch <1>: Attributes. (line 33)
5089 * touch: Data Modification Times.
5091 * touch, summary: Option Summary. (line 732)
5092 * transform: transform. (line 74)
5093 * transform, summary: Option Summary. (line 738)
5094 * uncompress: gzip. (line 151)
5095 * uncompress, summary: Option Summary. (line 152)
5096 * ungzip: gzip. (line 100)
5097 * ungzip, summary: Option Summary. (line 279)
5098 * unlink-first: Unlink First. (line 6)
5099 * unlink-first, introduced: Dealing with Old Files.
5101 * unlink-first, summary: Option Summary. (line 758)
5102 * unquote: Selecting Archive Members.
5104 * unquote, summary: Option Summary. (line 764)
5105 * update <1>: how to update. (line 6)
5106 * update: update. (line 6)
5107 * update, summary: Operation Summary. (line 50)
5108 * usage: help. (line 54)
5109 * use-compress-program: gzip. (line 156)
5110 * use-compress-program, summary: Option Summary. (line 768)
5111 * utc, summary: Option Summary. (line 773)
5112 * verbose: verbose. (line 18)
5113 * verbose, introduced: verbose tutorial. (line 6)
5114 * verbose, summary: Option Summary. (line 777)
5115 * verbose, using with --create: create verbose. (line 6)
5116 * verbose, using with --list: list. (line 30)
5117 * verify, short description: verify. (line 8)
5118 * verify, summary: Option Summary. (line 784)
5119 * verify, using with --create: verify. (line 24)
5120 * version: help. (line 6)
5121 * version, summary: Option Summary. (line 789)
5122 * volno-file: Multi-Volume Archives.
5124 * volno-file, summary: Option Summary. (line 794)
5125 * warning, explained: warnings. (line 12)
5126 * warning, summary: Option Summary. (line 799)
5127 * wildcards: controlling pattern-matching.
5129 * wildcards, summary: Option Summary. (line 804)
5130 * wildcards-match-slash: controlling pattern-matching.
5132 * wildcards-match-slash, summary: Option Summary. (line 808)
5133 * xform: transform. (line 74)
5134 * xform, summary: Option Summary. (line 738)
5135 * xz, summary: Option Summary. (line 811)
5138 File: tar.info, Node: Index, Prev: Index of Command Line Options, Up: Top
5146 * %s: Directory has been renamed from %s, warning message: warnings.
5148 * %s: Directory has been renamed, warning message: warnings. (line 94)
5149 * %s: Directory is new, warning message: warnings. (line 96)
5150 * %s: directory is on a different device: not purging, warning message: warnings.
5152 * -after-date and -update compared: after. (line 19)
5153 * -newer-mtime and -update compared: after. (line 19)
5154 * A lone zero block at, warning message: warnings. (line 35)
5155 * abbreviations for months: Calendar date items. (line 38)
5156 * absolute file names <1>: Remote Tape Server. (line 17)
5157 * absolute file names: absolute. (line 6)
5158 * Adding archives to an archive: concatenate. (line 6)
5159 * Adding files to an Archive: appending files. (line 6)
5160 * ADMINISTRATOR: General-Purpose Variables.
5162 * Age, excluding files by: after. (line 6)
5163 * ago in date strings: Relative items in date strings.
5165 * all: warnings. (line 28)
5166 * alone-zero-block: warnings. (line 35)
5167 * am in date strings: Time of day items. (line 22)
5168 * Appending files to an Archive: appending files. (line 6)
5169 * appending files to existing archive: append. (line 6)
5170 * Arch, excluding files: exclude. (line 37)
5171 * archive: Definitions. (line 6)
5172 * Archive creation: file. (line 34)
5173 * archive member: Definitions. (line 15)
5174 * Archive Name: file. (line 6)
5175 * Archive, creation of: create. (line 8)
5176 * Archives, Appending files to: appending files. (line 6)
5177 * archives, binary equivalent: PAX keywords. (line 132)
5178 * Archiving Directories: create dir. (line 6)
5179 * archiving files: Top. (line 24)
5180 * ARGP_HELP_FMT, environment variable: Configuring Help Summary.
5182 * arguments to long options: Long Options. (line 31)
5183 * arguments to old options: Old Options. (line 17)
5184 * arguments to short options: Short Options. (line 13)
5185 * atrributes, files: Attributes. (line 6)
5186 * Attempting extraction of symbolic links as hard links, warning message: warnings.
5188 * authors of get_date: Authors of get_date. (line 6)
5189 * Avoiding recursion in directories: recurse. (line 6)
5190 * backup options: backup. (line 6)
5191 * backup suffix: backup. (line 68)
5192 * BACKUP_DIRS: General-Purpose Variables.
5194 * BACKUP_FILES: General-Purpose Variables.
5196 * BACKUP_HOUR: General-Purpose Variables.
5198 * backups <1>: Backups. (line 6)
5199 * backups: backup. (line 41)
5200 * bad-dumpdir: warnings. (line 102)
5201 * basic operations: Operations. (line 6)
5202 * Bazaar, excluding files: exclude. (line 37)
5203 * beginning of time, for POSIX: Seconds since the Epoch.
5205 * bell, checkpoint action: checkpoints. (line 65)
5206 * Bellovin, Steven M.: Authors of get_date. (line 6)
5207 * Berets, Jim: Authors of get_date. (line 6)
5208 * Berry, K.: Authors of get_date. (line 14)
5209 * binary equivalent archives, creating: PAX keywords. (line 132)
5210 * block: Blocking. (line 6)
5211 * Block number where error occurred: verbose. (line 115)
5212 * BLOCKING: General-Purpose Variables.
5214 * blocking factor: Blocking Factor. (line 194)
5215 * Blocking Factor: Blocking Factor. (line 6)
5216 * Blocks per record: Blocking Factor. (line 6)
5217 * bug reports: Reports. (line 6)
5218 * Bytes per record: Blocking Factor. (line 6)
5219 * bzip2: gzip. (line 6)
5220 * cachedir: warnings. (line 43)
5221 * calendar date item: Calendar date items. (line 6)
5222 * case, ignored in dates: General date syntax. (line 64)
5223 * cat vs concatenate: concatenate. (line 63)
5224 * Changing directory mid-stream: directory. (line 6)
5225 * Character class, excluding characters from: wildcards. (line 34)
5226 * checkpoints, defined: checkpoints. (line 6)
5227 * Choosing an archive file: file. (line 6)
5228 * comments, in dates: General date syntax. (line 64)
5229 * compress: gzip. (line 6)
5230 * Compressed archives: gzip. (line 6)
5231 * concatenate vs cat: concatenate. (line 63)
5232 * Concatenating Archives: concatenate. (line 6)
5233 * contains a cache directory tag, warning message: warnings. (line 43)
5234 * contiguous-cast: warnings. (line 74)
5235 * corrupted archives <1>: gzip. (line 119)
5236 * corrupted archives: Full Dumps. (line 8)
5237 * Creation of the archive: create. (line 8)
5238 * Current %s is newer or same age, warning message: warnings. (line 83)
5239 * CVS, excluding files: exclude. (line 37)
5240 * Darcs, excluding files: exclude. (line 37)
5241 * DAT blocking: Blocking Factor. (line 204)
5242 * Data Modification time, excluding files by: after. (line 6)
5243 * Data modification times of extracted files: Data Modification Times.
5245 * date format, ISO 8601: Calendar date items. (line 30)
5246 * date input formats: Date input formats. (line 6)
5247 * day in date strings: Relative items in date strings.
5249 * day of week item: Day of week items. (line 6)
5250 * Deleting files from an archive: delete. (line 6)
5251 * Deleting from tape archives: delete. (line 17)
5252 * dereferencing hard links: hard links. (line 6)
5253 * Descending directories, avoiding: recurse. (line 6)
5254 * Device numbers, changing: Fixing Snapshot Files.
5256 * Device numbers, using in incremental backups: Incremental Dumps.
5258 * Directories, Archiving: create dir. (line 6)
5259 * Directories, avoiding recursion: recurse. (line 6)
5260 * Directory, changing mid-stream: directory. (line 6)
5261 * DIRLIST: General-Purpose Variables.
5263 * displacement of dates: Relative items in date strings.
5265 * doc-opt-col: Configuring Help Summary.
5267 * door ignored, warning message: warnings. (line 50)
5268 * dot, checkpoint action: checkpoints. (line 80)
5269 * Double-checking a write operation: verify. (line 6)
5270 * DUMP_BEGIN: User Hooks. (line 32)
5271 * DUMP_END: User Hooks. (line 36)
5272 * DUMP_REMIND_SCRIPT: General-Purpose Variables.
5274 * dumps, full: Full Dumps. (line 8)
5275 * dup-args: Configuring Help Summary.
5277 * dup-args-note: Configuring Help Summary.
5279 * echo, checkpoint action: checkpoints. (line 25)
5280 * Eggert, Paul: Authors of get_date. (line 6)
5281 * End-of-archive blocks, ignoring: Ignore Zeros. (line 6)
5282 * End-of-archive info script: Multi-Volume Archives.
5284 * entry: Naming tar Archives. (line 11)
5285 * epoch, for POSIX: Seconds since the Epoch.
5287 * Error message, block number of: verbose. (line 125)
5288 * Exabyte blocking: Blocking Factor. (line 204)
5289 * exclude: exclude. (line 12)
5290 * exclude-caches: exclude. (line 93)
5291 * exclude-from: exclude. (line 25)
5292 * exclude-tag: exclude. (line 116)
5293 * Excluding characters from a character class: wildcards. (line 34)
5294 * Excluding file by age: after. (line 6)
5295 * Excluding files by file system: exclude. (line 6)
5296 * Excluding files by name and pattern: exclude. (line 6)
5297 * Exec Mode, genfile: Exec Mode. (line 6)
5298 * exec, checkpoint action: checkpoints. (line 96)
5299 * existing backup method: backup. (line 59)
5300 * exit status: Synopsis. (line 67)
5301 * Extracting contiguous files as regular files, warning message: warnings.
5303 * extracting Nth copy of the file: append. (line 34)
5304 * Extraction: extract. (line 6)
5305 * extraction: Definitions. (line 22)
5306 * FDL, GNU Free Documentation License: GNU Free Documentation License.
5308 * file archival: Top. (line 24)
5309 * file attributes: Attributes. (line 6)
5310 * file changed as we read it, warning message: warnings. (line 64)
5311 * file is on a different filesystem, warning message: warnings.
5313 * file is the archive; not dumped, warning message: warnings. (line 58)
5314 * file is unchanged; not dumped, warning message: warnings. (line 55)
5315 * File lists separated by NUL characters: Generate Mode. (line 33)
5316 * file name: Definitions. (line 15)
5317 * File Name arguments, alternatives: files. (line 6)
5318 * File name arguments, using --list with: list. (line 68)
5319 * file name read contains nul character, warning message: warnings.
5321 * file names, absolute: absolute. (line 6)
5322 * File names, excluding files by: exclude. (line 6)
5323 * File names, terminated by NUL: nul. (line 6)
5324 * File names, using hard links: hard links. (line 6)
5325 * File names, using symbolic links: dereference. (line 6)
5326 * File removed before we read it, warning message: warnings. (line 61)
5327 * File shrank by %s bytes, warning message: warnings. (line 44)
5328 * File system boundaries, not crossing: one. (line 6)
5329 * file-changed: warnings. (line 64)
5330 * file-ignored: warnings. (line 50)
5331 * file-removed: warnings. (line 61)
5332 * file-shrank: warnings. (line 44)
5333 * file-unchanged: warnings. (line 55)
5334 * FILELIST: General-Purpose Variables.
5336 * filename-with-nuls: warnings. (line 32)
5337 * find, using with tar <1>: recurse. (line 11)
5338 * find, using with tar: files. (line 6)
5339 * first in date strings: General date syntax. (line 26)
5340 * format 0, snapshot file: Snapshot Files. (line 23)
5341 * format 1, snapshot file: Snapshot Files. (line 47)
5342 * format 2, snapshot file: Snapshot Files. (line 69)
5343 * Format Options: Format Variations. (line 6)
5344 * Format Parameters: Format Variations. (line 6)
5345 * Format, old style: old. (line 6)
5346 * fortnight in date strings: Relative items in date strings.
5348 * free documentation: Free Software Needs Free Documentation.
5350 * full dumps: Full Dumps. (line 8)
5351 * future time stamps: Large or Negative Values.
5353 * general date syntax: General date syntax. (line 6)
5354 * Generate Mode, genfile: Generate Mode. (line 6)
5355 * genfile: Genfile. (line 6)
5356 * genfile, create file: Generate Mode. (line 6)
5357 * genfile, creating sparse files: Generate Mode. (line 55)
5358 * genfile, generate mode: Generate Mode. (line 6)
5359 * genfile, reading a list of file names: Generate Mode. (line 22)
5360 * genfile, seeking to a given offset: Generate Mode. (line 18)
5361 * get_date: Date input formats. (line 6)
5362 * Getting program version number: help. (line 6)
5363 * git, excluding files: exclude. (line 37)
5364 * GNU archive format: gnu. (line 6)
5365 * GNU.sparse.major, extended header variable: PAX 1. (line 14)
5366 * GNU.sparse.map, extended header variable: PAX 0. (line 60)
5367 * GNU.sparse.minor, extended header variable: PAX 1. (line 17)
5368 * GNU.sparse.name, extended header variable: PAX 0. (line 68)
5369 * GNU.sparse.name, extended header variable, in v.1.0: PAX 1. (line 24)
5370 * GNU.sparse.numblocks, extended header variable: PAX 0. (line 15)
5371 * GNU.sparse.numbytes, extended header variable: PAX 0. (line 21)
5372 * GNU.sparse.offset, extended header variable: PAX 0. (line 18)
5373 * GNU.sparse.realsize, extended header variable: PAX 1. (line 24)
5374 * GNU.sparse.size, extended header variable: PAX 0. (line 11)
5375 * gnupg, using with tar: gzip. (line 171)
5376 * gpg, using with tar: gzip. (line 171)
5377 * gzip: gzip. (line 6)
5378 * hard links, dereferencing: hard links. (line 6)
5379 * header-col: Configuring Help Summary.
5381 * hook: User Hooks. (line 13)
5382 * hour in date strings: Relative items in date strings.
5384 * ignore-archive: warnings. (line 58)
5385 * ignore-newer: warnings. (line 83)
5386 * Ignoring end-of-archive blocks: Ignore Zeros. (line 6)
5387 * Ignoring unknown extended header keyword `%s', warning message: warnings.
5389 * implausibly old time stamp %s, warning message: warnings. (line 72)
5390 * Info script: Multi-Volume Archives.
5392 * Interactive operation: interactive. (line 6)
5393 * ISO 8601 date format: Calendar date items. (line 30)
5394 * items in date strings: General date syntax. (line 6)
5395 * Labeling an archive: label. (line 6)
5396 * labeling archives: Tape Files. (line 6)
5397 * Labeling multi-volume archives: label. (line 6)
5398 * Labels on the archive media: label. (line 6)
5399 * language, in dates: General date syntax. (line 40)
5400 * Large lists of file names on small machines: Same Order. (line 6)
5401 * large values: Large or Negative Values.
5403 * last DAY: Day of week items. (line 15)
5404 * last in date strings: General date syntax. (line 26)
5405 * Listing all tar options: help. (line 27)
5406 * listing member and file names: list. (line 41)
5407 * Listing volume label: label. (line 29)
5408 * Lists of file names: files. (line 6)
5409 * Local and remote archives: file. (line 71)
5410 * long options: Long Options. (line 6)
5411 * long options with mandatory arguments: Long Options. (line 31)
5412 * long options with optional arguments: Long Options. (line 40)
5413 * long-opt-col: Configuring Help Summary.
5415 * lzip: gzip. (line 6)
5416 * lzma: gzip. (line 6)
5417 * lzop: gzip. (line 6)
5418 * MacKenzie, David: Authors of get_date. (line 6)
5419 * Malformed dumpdir: 'X' never used, warning message: warnings.
5421 * member: Definitions. (line 15)
5422 * member name: Definitions. (line 15)
5423 * members, multiple: multiple. (line 6)
5424 * Members, replacing with other members: append. (line 47)
5425 * Mercurial, excluding files: exclude. (line 37)
5426 * Meyering, Jim: Authors of get_date. (line 6)
5427 * Middle of the archive, starting in the: Starting File. (line 11)
5428 * midnight in date strings: Time of day items. (line 22)
5429 * minute in date strings: Relative items in date strings.
5431 * minutes, time zone correction by: Time of day items. (line 30)
5432 * Modes of extracted files: Setting Access Permissions.
5434 * Modification time, excluding files by: after. (line 6)
5435 * Modification times of extracted files: Data Modification Times.
5437 * month in date strings: Relative items in date strings.
5439 * month names in date strings: Calendar date items. (line 38)
5440 * months, written-out: General date syntax. (line 36)
5441 * MT: General-Purpose Variables.
5443 * MT_BEGIN: Magnetic Tape Control.
5445 * MT_OFFLINE: Magnetic Tape Control.
5447 * MT_REWIND: Magnetic Tape Control.
5449 * MT_STATUS: Magnetic Tape Control.
5451 * Multi-volume archives: Multi-Volume Archives.
5453 * multiple members: multiple. (line 6)
5454 * Mutli-volume archives in PAX format, extracting using non-GNU tars: Split Recovery.
5456 * Mutli-volume archives, extracting using non-GNU tars: Split Recovery.
5458 * Naming an archive: file. (line 6)
5459 * negative time stamps: Large or Negative Values.
5461 * new-directory: warnings. (line 96)
5462 * next DAY: Day of week items. (line 15)
5463 * next in date strings: General date syntax. (line 26)
5464 * none: warnings. (line 29)
5465 * noon in date strings: Time of day items. (line 22)
5466 * now in date strings: Relative items in date strings.
5468 * ntape device: Many. (line 6)
5469 * NUL-terminated file names: nul. (line 6)
5470 * Number of blocks per record: Blocking Factor. (line 6)
5471 * Number of bytes per record: Blocking Factor. (line 6)
5472 * numbered backup method: backup. (line 55)
5473 * numbers, written-out: General date syntax. (line 26)
5474 * Obtaining help: help. (line 27)
5475 * Obtaining total status information: verbose. (line 46)
5476 * Old GNU archive format: gnu. (line 6)
5477 * Old GNU sparse format: Old GNU Format. (line 6)
5478 * old option style: Old Options. (line 6)
5479 * old options with mandatory arguments: Old Options. (line 17)
5480 * Old style archives: old. (line 6)
5481 * Old style format: old. (line 6)
5482 * opt-doc-col: Configuring Help Summary.
5484 * option syntax, traditional: Old Options. (line 58)
5485 * optional arguments to long options: Long Options. (line 40)
5486 * optional arguments to short options: Short Options. (line 22)
5487 * options for use with --extract: extract options. (line 6)
5488 * Options when reading archives: Reading. (line 6)
5489 * Options, archive format specifying: Format Variations. (line 6)
5490 * Options, format specifying: Format Variations. (line 6)
5491 * options, GNU style: Long Options. (line 6)
5492 * options, long style: Long Options. (line 6)
5493 * options, mixing different styles: Mixing. (line 6)
5494 * options, mnemonic names: Long Options. (line 6)
5495 * options, old style: Old Options. (line 6)
5496 * options, short style: Short Options. (line 6)
5497 * options, traditional: Short Options. (line 6)
5498 * ordinal numbers: General date syntax. (line 26)
5499 * Overwriting old files, prevention: Dealing with Old Files.
5501 * pattern, genfile: Generate Mode. (line 39)
5502 * PAX archive format: posix. (line 6)
5503 * Permissions of extracted files: Setting Access Permissions.
5505 * Pinard, F.: Authors of get_date. (line 14)
5506 * pm in date strings: Time of day items. (line 22)
5507 * POSIX archive format: posix. (line 6)
5508 * Progress information: verbose. (line 83)
5509 * Protecting old files: Dealing with Old Files.
5511 * pure numbers in date strings: Pure numbers in date strings.
5513 * RCS, excluding files: exclude. (line 37)
5514 * Reading file names from a file: files. (line 6)
5515 * Reading incomplete records: Reading. (line 6)
5516 * record: Blocking. (line 6)
5517 * Record Size: Blocking Factor. (line 6)
5518 * Records, incomplete: Reading. (line 6)
5519 * Recursion in directories, avoiding: recurse. (line 6)
5520 * relative items in date strings: Relative items in date strings.
5522 * Remote devices: file. (line 60)
5523 * remote tape drive: Remote Tape Server. (line 6)
5524 * Removing files from an archive: delete. (line 6)
5525 * rename-directory: warnings. (line 94)
5526 * Replacing members with other members: append. (line 47)
5527 * reporting bugs: Reports. (line 6)
5528 * RESTORE_BEGIN: User Hooks. (line 39)
5529 * RESTORE_END: User Hooks. (line 42)
5530 * Resurrecting files from an archive: extract. (line 6)
5531 * Retrieving files from an archive: extract. (line 6)
5532 * return status: Synopsis. (line 67)
5533 * rmargin: Configuring Help Summary.
5535 * rmt: Remote Tape Server. (line 6)
5536 * RSH: General-Purpose Variables.
5538 * RSH_COMMAND: General-Purpose Variables.
5540 * Running out of space: Scarce. (line 8)
5541 * Salz, Rich: Authors of get_date. (line 6)
5542 * SCCS, excluding files: exclude. (line 37)
5543 * short options: Short Options. (line 6)
5544 * short options with mandatory arguments: Short Options. (line 13)
5545 * short options with optional arguments: Short Options. (line 22)
5546 * short-opt-col: Configuring Help Summary.
5548 * simple backup method: backup. (line 64)
5549 * SIMPLE_BACKUP_SUFFIX: backup. (line 68)
5550 * sleep, checkpoint action: checkpoints. (line 90)
5551 * SLEEP_MESSAGE: General-Purpose Variables.
5553 * SLEEP_TIME: General-Purpose Variables.
5555 * Small memory: Scarce. (line 8)
5556 * snapshot file, format 0: Snapshot Files. (line 23)
5557 * snapshot file, format 1: Snapshot Files. (line 47)
5558 * snapshot file, format 2: Snapshot Files. (line 69)
5559 * snapshot files, editing: Fixing Snapshot Files.
5561 * snapshot files, fixing device numbers: Fixing Snapshot Files.
5563 * socket ignored, warning message: warnings. (line 50)
5564 * Sparse Files: sparse. (line 6)
5565 * sparse files v.0.0, extracting with non-GNU tars: Sparse Recovery.
5567 * sparse files v.0.1, extracting with non-GNU tars: Sparse Recovery.
5569 * sparse files v.1.0, extracting with non-GNU tars: Sparse Recovery.
5571 * Sparse files, creating using genfile: Generate Mode. (line 55)
5572 * sparse files, extracting with non-GNU tars: Sparse Recovery.
5574 * sparse formats: Sparse Formats. (line 6)
5575 * sparse formats, defined: sparse. (line 50)
5576 * sparse formats, Old GNU: Old GNU Format. (line 6)
5577 * sparse formats, v.0.0: PAX 0. (line 6)
5578 * sparse formats, v.0.1: PAX 0. (line 52)
5579 * sparse formats, v.1.0: PAX 1. (line 6)
5580 * sparse versions: Sparse Formats. (line 6)
5581 * Specifying archive members: Selecting Archive Members.
5583 * Specifying files to act on: Selecting Archive Members.
5585 * Standard input and output: file. (line 39)
5586 * Standard output, writing extracted files to: Writing to Standard Output.
5588 * Storing archives in compressed format: gzip. (line 6)
5589 * SVN, excluding files: exclude. (line 37)
5590 * Symbolic link as file name: dereference. (line 6)
5591 * symlink-cast: warnings. (line 77)
5592 * TAPE: file tutorial. (line 14)
5593 * tape blocking: Blocking Factor. (line 194)
5594 * tape marks: Many. (line 44)
5595 * tape positioning: Many. (line 26)
5596 * TAPE_FILE: General-Purpose Variables.
5598 * Tapes, using --delete and: delete. (line 17)
5599 * TAR: General-Purpose Variables.
5601 * tar: What tar Does. (line 6)
5602 * tar archive: Definitions. (line 6)
5603 * Tar archive formats: Formats. (line 6)
5604 * tar entry: Naming tar Archives. (line 11)
5605 * tar file: Naming tar Archives. (line 11)
5606 * tar to a remote device: file. (line 60)
5607 * tar to standard input and output: file. (line 39)
5608 * tar-snapshot-edit: Fixing Snapshot Files.
5610 * TAR_ARCHIVE, checkpoint script environment: checkpoints. (line 108)
5611 * TAR_ARCHIVE, info script environment variable: Multi-Volume Archives.
5613 * TAR_ARCHIVE, to-command environment: Writing to an External Program.
5615 * TAR_ATIME, to-command environment: Writing to an External Program.
5617 * TAR_BLOCKING_FACTOR, checkpoint script environment: checkpoints.
5619 * TAR_BLOCKING_FACTOR, info script environment variable: Multi-Volume Archives.
5621 * TAR_BLOCKING_FACTOR, to-command environment: Writing to an External Program.
5623 * TAR_CHECKPOINT, checkpoint script environment: checkpoints. (line 114)
5624 * TAR_CTIME, to-command environment: Writing to an External Program.
5626 * TAR_FD, info script environment variable: Multi-Volume Archives.
5628 * TAR_FILENAME, to-command environment: Writing to an External Program.
5630 * TAR_FILETYPE, to-command environment: Writing to an External Program.
5632 * TAR_FORMAT, checkpoint script environment: checkpoints. (line 121)
5633 * TAR_FORMAT, info script environment variable: Multi-Volume Archives.
5635 * TAR_FORMAT, to-command environment: Writing to an External Program.
5637 * TAR_GID, to-command environment: Writing to an External Program.
5639 * TAR_GNAME, to-command environment: Writing to an External Program.
5641 * TAR_MODE, to-command environment: Writing to an External Program.
5643 * TAR_MTIME, to-command environment: Writing to an External Program.
5645 * TAR_OPTIONS, environment variable: using tar options. (line 30)
5646 * TAR_REALNAME, to-command environment: Writing to an External Program.
5648 * TAR_SIZE, to-command environment: Writing to an External Program.
5650 * TAR_SUBCOMMAND, checkpoint script environment: checkpoints. (line 117)
5651 * TAR_SUBCOMMAND, info script environment variable: Multi-Volume Archives.
5653 * TAR_UID, to-command environment: Writing to an External Program.
5655 * TAR_UNAME, to-command environment: Writing to an External Program.
5657 * TAR_VERSION, checkpoint script environment: checkpoints. (line 105)
5658 * TAR_VERSION, info script environment variable: Multi-Volume Archives.
5660 * TAR_VERSION, to-command environment: Writing to an External Program.
5662 * TAR_VOLUME, info script environment variable: Multi-Volume Archives.
5664 * TAR_VOLUME, to-command environment: Writing to an External Program.
5666 * tarcat: Tarcat. (line 6)
5667 * this in date strings: Relative items in date strings.
5669 * time of day item: Time of day items. (line 6)
5670 * time stamp %s is %s s in the future, warning message: warnings.
5672 * time zone correction: Time of day items. (line 30)
5673 * time zone item <1>: Time zone items. (line 6)
5674 * time zone item: General date syntax. (line 44)
5675 * timestamp: warnings. (line 72)
5676 * today in date strings: Relative items in date strings.
5678 * tomorrow in date strings: Relative items in date strings.
5680 * ttyout, checkpoint action: checkpoints. (line 70)
5681 * TZ: Specifying time zone rules.
5683 * Ultrix 3.1 and write failure: Remote Tape Server. (line 40)
5684 * Unknown file type `%c', extracted as normal file, warning message: warnings.
5686 * Unknown file type; file ignored, warning message: warnings. (line 50)
5687 * unknown-cast: warnings. (line 80)
5688 * unknown-keyword: warnings. (line 86)
5689 * unpacking: Definitions. (line 22)
5690 * Updating an archive: update. (line 6)
5691 * usage-indent: Configuring Help Summary.
5693 * Using encrypted archives: gzip. (line 171)
5694 * ustar archive format: ustar. (line 6)
5695 * uuencode: Applications. (line 8)
5696 * v7 archive format: old. (line 6)
5697 * VCS, excluding files: exclude. (line 37)
5698 * Verbose operation: verbose. (line 18)
5699 * Verifying a write operation: verify. (line 6)
5700 * Verifying the currency of an archive: compare. (line 6)
5701 * version control system, excluding files: exclude. (line 37)
5702 * Version of the tar program: help. (line 6)
5703 * version-control Emacs variable: backup. (line 49)
5704 * VERSION_CONTROL: backup. (line 41)
5705 * volno file: Multi-Volume Archives.
5707 * VOLNO_FILE: General-Purpose Variables.
5709 * Volume label, listing: label. (line 29)
5710 * Volume number file: Multi-Volume Archives.
5712 * week in date strings: Relative items in date strings.
5714 * Where is the archive?: file. (line 6)
5715 * Working directory, specifying: directory. (line 6)
5716 * Writing extracted files to standard output: Writing to Standard Output.
5718 * Writing new archives: file. (line 34)
5719 * xdev: warnings. (line 47)
5720 * XLIST: General-Purpose Variables.
5722 * xsparse: Sparse Recovery. (line 13)
5723 * year in date strings: Relative items in date strings.
5725 * yesterday in date strings: Relative items in date strings.