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