Print this page
3474 tar should support -C on extract
Reviewed by: Robert Mustacchi <rm@joyent.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/tar.1
+++ new/usr/src/man/man1/tar.1
1 1 '\" te
2 2 .\" Copyright 1989 AT&T
3 3 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
4 4 .\" Copyright 2012 Milan Jurik. All rights reserved.
5 +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
5 6 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
6 7 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
7 8 .\" http://www.opengroup.org/bookstore/.
8 9 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
9 10 .\" This notice shall appear on any product containing this material.
10 11 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
11 12 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
12 13 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
13 -.TH TAR 1 "May 9, 2012"
14 +.TH TAR 1 "Jan 16, 2013"
14 15 .SH NAME
15 16 tar \- create tape archives and add or extract files
16 17 .SH SYNOPSIS
17 18 .LP
18 19 .nf
19 20 \fBtar\fR c[BDeEFhilnopPqTvw@/[0-7]][bfk][X...][a|j|J|z|Z] [\fIblocksize\fR]
20 21 [\fItarfile\fR] [\fIsize\fR] [\fIexclude-file\fR]...
21 22 {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
22 23 .fi
23 24
24 25 .LP
25 26 .nf
26 27 \fBtar\fR r[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
27 28 [\fIsize\fR]
28 29 {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
29 30 .fi
30 31
31 32 .LP
32 33 .nf
33 34 \fBtar\fR t[BeFhilnqTv[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
34 35 [\fIexclude-file\fR]... {\fIfile\fR | \(miI \fIinclude-file\fR}...
35 36 .fi
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
36 37
37 38 .LP
38 39 .nf
39 40 \fBtar\fR u[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
40 41 [\fIsize\fR] \fIfile\fR...
41 42 .fi
42 43
43 44 .LP
44 45 .nf
45 46 \fBtar\fR x[BeFhilmnopqTvw@/[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
46 - [\fIexclude-file\fR]... [\fIfile\fR]...
47 + [\fIexclude-file\fR]... [\(miC \fIdirectory\fR] [\fIfile\fR]...
47 48 .fi
48 49
49 50 .SH DESCRIPTION
50 51 .sp
51 52 .LP
52 53 The \fBtar\fR command archives and extracts files to and from a single file
53 54 called a \fItarfile\fR. A tarfile is usually a magnetic tape, but it can be any
54 55 file. \fBtar\fR's actions are controlled by the \fIkey\fR argument. The
55 56 \fIkey\fR is a string of characters containing exactly one function letter
56 57 (\fBc\fR, \fBr\fR, \fBt\fR , \fBu\fR, or \fBx\fR) and zero or more function
57 58 modifiers (letters or digits), depending on the function letter used. The
58 59 \fIkey\fR string contains no SPACE characters. Function modifier arguments are
59 60 listed on the command line in the same order as their corresponding function
60 61 modifiers appear in the \fIkey\fR string.
61 62 .sp
62 63 .LP
63 64 The \fB\(miI\fR \fIinclude-file\fR, \fB\(miC\fR \fIdirectory file\fR, and
64 65 \fIfile\fR arguments specify which files or directories are to be archived or
65 66 extracted. In all cases, appearance of a directory name refers to the files and
66 67 (recursively) subdirectories of that directory. Arguments appearing within
67 68 braces (\fB{ }\fR) indicate that one of the arguments must be specified.
68 69 .SH OPERANDS
69 70 .sp
70 71 .LP
71 72 The following operands are supported:
72 73 .sp
73 74 .ne 2
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
74 75 .na
75 76 \fB\fB\(miC\fR \fIdirectory file\fR\fR
76 77 .ad
77 78 .sp .6
78 79 .RS 4n
79 80 Performs a \fBchdir\fR (see \fBcd\fR(1)) operation on \fIdirectory\fR and
80 81 performs the \fBc\fR (create) or \fBr\fR (replace) operation on \fIfile\fR. Use
81 82 short relative path names for \fIfile\fR. If \fIfile\fR is "\fB\&.\fR", archive
82 83 all files in \fIdirectory\fR. This operand enables archiving files from
83 84 multiple directories not related by a close common parent.
85 +.sp
86 +This option may also be passed once to \fBx\fR (extract). In this case the
87 +program will \fBchdir\fR to \fIdirectory\fR after opening the archive, but
88 +before extracting its contents.
84 89 .RE
85 90
86 91 .sp
87 92 .ne 2
88 93 .na
89 94 \fB\fB\(miI\fR \fIinclude-file\fR\fR
90 95 .ad
91 96 .sp .6
92 97 .RS 4n
93 98 Opens \fIinclude-file\fR containing a list of files, one per line, and treats
94 99 it as if each file appeared separately on the command line. Be careful of
95 100 trailing white spaces. Also beware of leading white spaces, since, for each
96 101 line in the included file, the entire line (apart from the newline) is used to
97 102 match against the initial string of files to include. In the case where
98 103 excluded files (see \fBX\fR function modifier) are also specified, they take
99 104 precedence over all included files. If a file is specified in both the
100 105 \fIexclude-file\fR and the \fIinclude-file\fR (or on the command line), it is
101 106 excluded.
102 107 .RE
103 108
104 109 .sp
105 110 .ne 2
106 111 .na
107 112 \fB\fIfile\fR\fR
108 113 .ad
109 114 .sp .6
110 115 .RS 4n
111 116 A path name of a regular file or directory to be archived (when the \fBc\fR,
112 117 \fBr\fR or \fBu\fR functions are specified), extracted (\fBx\fR) or listed
113 118 (\fBt\fR). When \fIfile\fR is the path name of a directory, the action applies
114 119 to all of the files and (recursively) subdirectories of that directory.
115 120 .sp
116 121 When a file is archived, and the \fBE\fR flag (see \fBFunction Modifiers\fR) is
117 122 not specified, the filename cannot exceed 256 characters. In addition, it must
118 123 be possible to split the name between parent directory names so that the prefix
119 124 is no longer than 155 characters and the name is no longer than 100 characters.
120 125 If \fBE\fR is specified, a name of up to \fIPATH_MAX\fR characters can be
121 126 specified.
122 127 .sp
123 128 For example, a file whose basename is longer than 100 characters could not be
124 129 archived without using the \fBE\fR flag. A file whose directory portion is 200
125 130 characters and whose basename is 50 characters could be archived (without using
126 131 \fBE\fR) if a slash appears in the directory name somewhere in character
127 132 positions 151-156.
128 133 .RE
129 134
130 135 .SS "Function Letters"
131 136 .sp
132 137 .LP
133 138 The function portion of the key is specified by one of the following letters:
134 139 .sp
135 140 .ne 2
136 141 .na
137 142 \fB\fBc\fR\fR
138 143 .ad
139 144 .sp .6
140 145 .RS 4n
141 146 Create. Writing begins at the beginning of the tarfile, instead of at the end.
142 147 .RE
143 148
144 149 .sp
145 150 .ne 2
146 151 .na
147 152 \fB\fBr\fR\fR
148 153 .ad
149 154 .sp .6
150 155 .RS 4n
151 156 Replace. The named \fIfile\fRs are written at the end of the tarfile. A file
152 157 created with extended headers must be updated with extended headers (see
153 158 \fBE\fR flag under \fBFunction Modifiers\fR). A file created without extended
154 159 headers cannot be modified with extended headers.
155 160 .RE
156 161
157 162 .sp
158 163 .ne 2
159 164 .na
160 165 \fB\fBt\fR\fR
161 166 .ad
162 167 .sp .6
163 168 .RS 4n
164 169 Table of Contents. The names of the specified files are listed each time they
165 170 occur in the tarfile. If no \fIfile\fR argument is specified, the names of all
166 171 files and any associated extended attributes in the tarfile are listed. With
167 172 the \fBv\fR function modifier, additional information for the specified files
168 173 is displayed.
169 174 .RE
170 175
171 176 .sp
172 177 .ne 2
173 178 .na
174 179 \fB\fBu\fR\fR
175 180 .ad
176 181 .sp .6
177 182 .RS 4n
178 183 Update. The named \fIfile\fRs are written at the end of the tarfile if they are
179 184 not already in the tarfile, or if they have been modified since last written to
180 185 that tarfile. An update can be rather slow. A tarfile created on a 5.x system
181 186 cannot be updated on a 4.x system. A file created with extended headers must be
182 187 updated with extended headers (see \fBE\fR flag under \fBFunction
183 188 Modifiers\fR). A file created without extended headers cannot be modified with
184 189 extended headers.
185 190 .RE
186 191
187 192 .sp
188 193 .ne 2
189 194 .na
190 195 \fB\fBx\fR\fR
191 196 .ad
192 197 .sp .6
193 198 .RS 4n
194 199 Extract or restore. The named \fIfile\fRs are extracted from the tarfile and
195 200 written to the directory specified in the tarfile, relative to the current
196 201 directory. Use the relative path names of files and directories to be
197 202 extracted.
198 203 .sp
199 204 Absolute path names contained in the tar archive are unpacked using the
200 205 absolute path names, that is, the leading forward slash (\fB/\fR) is \fBnot\fR
201 206 stripped off.
202 207 .sp
203 208 If a named file matches a directory whose contents has been written to the
204 209 tarfile, this directory is recursively extracted. The owner, modification time,
205 210 and mode are restored (if possible); otherwise, to restore owner, you must be
206 211 the super-user. Character-special and block-special devices (created by
207 212 \fBmknod\fR(1M)) can only be extracted by the super-user. If no \fIfile\fR
208 213 argument is specified, the entire content of the tarfile is extracted. If the
209 214 tarfile contains several files with the same name, each file is written to the
210 215 appropriate directory, overwriting the previous one. Filename substitution
211 216 wildcards cannot be used for extracting files from the archive. Rather, use a
212 217 command of the form:
213 218 .sp
214 219 .in +2
215 220 .nf
216 221 \fBtar xvf ... /dev/rmt/0 \(gatar tf ... /dev/rmt/0 | \e
217 222 grep '\fIpattern\fR' \(ga\fR
218 223 .fi
219 224 .in -2
220 225 .sp
221 226
222 227 .RE
223 228
224 229 .sp
225 230 .LP
226 231 When extracting tapes created with the \fBr\fR or \fBu\fR functions, directory
227 232 modification times can not be set correctly. These same functions cannot be
228 233 used with many tape drives due to tape drive limitations such as the absence of
229 234 backspace or append capabilities.
230 235 .sp
231 236 .LP
232 237 When using the \fBr\fR, \fBu\fR, or \fBx\fR functions or the \fBX\fR function
233 238 modifier, the named files must match exactly the corresponding files in the
234 239 \fItarfile\fR. For example, to extract \fB\&./\fR\fIthisfile\fR, you must
235 240 specify \fB\&./\fR\fIthisfile,\fR and not \fIthisfile\fR. The \fBt\fR function
236 241 displays how each file was archived.
237 242 .SS "Function Modifiers"
238 243 .sp
239 244 .LP
240 245 The characters below can be used in conjunction with the letter that selects
241 246 the desired function.
242 247 .sp
243 248 .ne 2
244 249 .na
245 250 \fB\fBa\fR\fR
246 251 .ad
247 252 .sp .6
248 253 .RS 4n
249 254 During a \fBcreate\fR operation autodetect compression based on the archive
250 255 suffix.
251 256 .RE
252 257
253 258 .sp
254 259 .ne 2
255 260 .na
256 261 \fB\fBb\fR \fIblocksize\fR\fR
257 262 .ad
258 263 .sp .6
259 264 .RS 4n
260 265 Blocking Factor. Use when reading or writing to raw magnetic archives (see
261 266 \fBf\fR below). The \fIblocksize\fR argument specifies the number of 512-byte
262 267 tape blocks to be included in each read or write operation performed on the
263 268 tarfile. The minimum is \fB1\fR, the default is \fB20\fR. The maximum value is
264 269 a function of the amount of memory available and the blocking requirements of
265 270 the specific tape device involved (see \fBmtio\fR(7I) for details.) The maximum
266 271 cannot exceed \fBINT_MAX\fR/512 (\fB4194303\fR).
267 272 .sp
268 273 When a tape archive is being read, its actual blocking factor is automatically
269 274 detected, provided that it is less than or equal to the nominal blocking factor
270 275 (the value of the \fIblocksize\fR argument, or the default value if the \fBb\fR
271 276 modifier is not specified). If the actual blocking factor is greater than the
272 277 nominal blocking factor, a read error results. See Example 5 in EXAMPLES.
273 278 .RE
274 279
275 280 .sp
276 281 .ne 2
277 282 .na
278 283 \fB\fBB\fR\fR
279 284 .ad
280 285 .sp .6
281 286 .RS 4n
282 287 Block. Force \fBtar\fR to perform multiple reads (if necessary) to read exactly
283 288 enough bytes to fill a block. This function modifier enables \fBtar\fR to work
284 289 across the Ethernet, since pipes and sockets return partial blocks even when
285 290 more data is coming. When reading from standard input, "\fB\(mi\fR", this
286 291 function modifier is selected by default to ensure that \fBtar\fR can recover
287 292 from short reads.
288 293 .RE
289 294
290 295 .sp
291 296 .ne 2
292 297 .na
293 298 \fB\fBD\fR\fR
294 299 .ad
295 300 .sp .6
296 301 .RS 4n
297 302 Data change warnings. Used with \fBc\fR, \fBr\fR, or \fBu\fR function letters.
298 303 Ignored with \fBt\fR or \fBx\fR function letters. If the size of a file changes
299 304 while the file is being archived, treat this condition as a warning instead of
300 305 as an error. A warning message is still written, but the exit status is not
301 306 affected.
302 307 .RE
303 308
304 309 .sp
305 310 .ne 2
306 311 .na
307 312 \fB\fBe\fR\fR
308 313 .ad
309 314 .sp .6
310 315 .RS 4n
311 316 Error. Exit immediately with a positive exit status if any unexpected errors
312 317 occur. The \fBSYSV3\fR environment variable overrides the default behavior.
313 318 (See ENVIRONMENT VARIABLES section below.)
314 319 .RE
315 320
316 321 .sp
317 322 .ne 2
318 323 .na
319 324 \fB\fBE\fR\fR
320 325 .ad
321 326 .sp .6
322 327 .RS 4n
323 328 Write a tarfile with extended headers. (Used with \fBc\fR, \fBr\fR, or \fBu\fR
324 329 function letters. Ignored with \fBt\fR or \fBx\fR function letters.) When a
325 330 tarfile is written with extended headers, the modification time is maintained
326 331 with a granularity of microseconds rather than seconds. In addition, filenames
327 332 no longer than \fBPATH_MAX\fR characters that could not be archived without
328 333 \fBE\fR, and file sizes greater than \fB8GB\fR, are supported. The \fBE\fR flag
329 334 is required whenever the larger files and/or files with longer names, or whose
330 335 \fBUID/GID\fR exceed \fB2097151\fR, are to be archived, or if time granularity
331 336 of microseconds is desired.
332 337 .RE
333 338
334 339 .sp
335 340 .ne 2
336 341 .na
337 342 \fB\fBf\fR\fR
338 343 .ad
339 344 .sp .6
340 345 .RS 4n
341 346 File. Use the \fItarfile\fR argument as the name of the tarfile. If \fBf\fR is
342 347 specified, \fB/etc/default/tar\fR is not searched. If \fBf\fR is omitted,
343 348 \fBtar\fR uses the device indicated by the \fBTAPE\fR environment variable, if
344 349 set. Otherwise, \fBtar\fR uses the default values defined in
345 350 \fB/etc/default/tar\fR. The number matching the \fBarchive\fR\fIN\fR string is
346 351 used as the output device with the blocking and size specifications from the
347 352 file. For example,
348 353 .sp
349 354 .in +2
350 355 .nf
351 356 \fBtar -c 2/tmp/*\fR
352 357 .fi
353 358 .in -2
354 359 .sp
355 360
356 361 writes the output to the device specified as \fBarchive2\fR in
357 362 \fB/etc/default/tar\fR.
358 363 .sp
359 364 If the name of the tarfile is "\fB\(mi\fR", \fBtar\fR writes to the standard
360 365 output or reads from the standard input, whichever is appropriate. \fBtar\fR
361 366 can be used as the head or tail of a pipeline. \fBtar\fR can also be used to
362 367 move hierarchies with the command:
363 368 .sp
364 369 .in +2
365 370 .nf
366 371 example% \fBcd fromdir; tar cf \(mi .| (cd todir; tar xfBp \(mi)\fR
367 372 .fi
368 373 .in -2
369 374 .sp
370 375
371 376 .RE
372 377
373 378 .sp
374 379 .ne 2
375 380 .na
376 381 \fB\fBF\fR\fR
377 382 .ad
378 383 .sp .6
379 384 .RS 4n
380 385 With one \fBF\fR argument, \fBtar\fR excludes all directories named \fBSCCS\fR
381 386 and \fBRCS\fR from the tarfile. With two arguments, \fBFF\fR, \fBtar\fR
382 387 excludes all directories named SCCS and RCS, all files with \fB\&.o\fR as their
383 388 suffix, and all files named \fBerrs\fR, \fBcore\fR, and \fBa.out\fR. The
384 389 \fBSYSV3\fR environment variable overrides the default behavior. (See
385 390 ENVIRONMENT VARIABLES section below.)
386 391 .RE
387 392
388 393 .sp
389 394 .ne 2
390 395 .na
391 396 \fB\fBh\fR\fR
392 397 .ad
393 398 .sp .6
394 399 .RS 4n
395 400 Follow symbolic links as if they were normal files or directories. Normally,
396 401 \fBtar\fR does not follow symbolic links.
397 402 .RE
398 403
399 404 .sp
400 405 .ne 2
401 406 .na
402 407 \fB\fBi\fR\fR
403 408 .ad
404 409 .sp .6
405 410 .RS 4n
406 411 Ignore directory checksum errors.
407 412 .RE
408 413
409 414 .sp
410 415 .ne 2
411 416 .na
412 417 \fB\fBj\fR\fR
413 418 .ad
414 419 .sp .6
415 420 .RS 4n
416 421 Use \fBbzip2\fR for compressing or decompressing the archives.
417 422 .RE
418 423
419 424 .sp
420 425 .ne 2
421 426 .na
422 427 \fB\fBJ\fR\fR
423 428 .ad
424 429 .sp .6
425 430 .RS 4n
426 431 Use \fBxz\fR for compressing or decompressing the archives.
427 432 .RE
428 433
429 434 .sp
430 435 .ne 2
431 436 .na
432 437 \fB\fBk\fR \fIsize\fR\fR
433 438 .ad
434 439 .sp .6
435 440 .RS 4n
436 441 Requires \fBtar\fR to use the size argument as the size of an archive in
437 442 kilobytes. This is useful when the archive is intended for a fixed size device
438 443 such as floppy disks. Large files are then split across volumes if they do not
439 444 fit in the specified size.
440 445 .RE
441 446
442 447 .sp
443 448 .ne 2
444 449 .na
445 450 \fB\fBl\fR\fR
446 451 .ad
447 452 .sp .6
448 453 .RS 4n
449 454 Link. Output error message if unable to resolve all links to the files being
450 455 archived. If \fBl\fR is not specified, no error messages are printed.
451 456 .RE
452 457
453 458 .sp
454 459 .ne 2
455 460 .na
456 461 \fB\fBm\fR\fR
457 462 .ad
458 463 .sp .6
459 464 .RS 4n
460 465 Modify. The modification time of the file is the time of extraction. This
461 466 function modifier is valid only with the \fBx\fR function.
462 467 .RE
463 468
464 469 .sp
465 470 .ne 2
466 471 .na
467 472 \fB\fBn\fR\fR
468 473 .ad
469 474 .sp .6
470 475 .RS 4n
471 476 The file being read is a non-tape device. Reading of the archive is faster
472 477 since \fBtar\fR can randomly seek around the archive.
473 478 .RE
474 479
475 480 .sp
476 481 .ne 2
477 482 .na
478 483 \fB\fBo\fR\fR
479 484 .ad
480 485 .sp .6
481 486 .RS 4n
482 487 Ownership. Assign to extracted files the user and group identifiers of the user
483 488 running the program, rather than those on tarfile. This is the default behavior
484 489 for users other than root. If the \fBo\fR function modifier is not set and the
485 490 user is root, the extracted files takes on the group and user identifiers of
486 491 the files on tarfile (see \fBchown\fR(1) for more information). The \fBo\fR
487 492 function modifier is only valid with the \fBx\fR function.
488 493 .RE
489 494
490 495 .sp
491 496 .ne 2
492 497 .na
493 498 \fB\fBp\fR\fR
494 499 .ad
495 500 .sp .6
496 501 .RS 4n
497 502 Restore the named files to their original modes, and \fBACL\fRs if applicable,
498 503 ignoring the present \fBumask\fR(1). This is the default behavior if invoked as
499 504 super-user with the \fBx\fR function letter specified. If super-user,
500 505 \fBSETUID\fR, and sticky information are also extracted, and files are restored
501 506 with their original owners and permissions, rather than owned by root. When
502 507 this function modifier is used with the \fBc\fR function, \fBACL\fRs are
503 508 created in the tarfile along with other information. Errors occur when a
504 509 tarfile with \fBACL\fRs is extracted by previous versions of \fBtar\fR.
505 510 .RE
506 511
507 512 .sp
508 513 .ne 2
509 514 .na
510 515 \fB\fBP\fR\fR
511 516 .ad
512 517 .sp .6
513 518 .RS 4n
514 519 Suppress the addition of a trailing "\fB/\fR" on directory entries in the
515 520 archive.
516 521 .RE
517 522
518 523 .sp
519 524 .ne 2
520 525 .na
521 526 \fB\fBq\fR\fR
522 527 .ad
523 528 .sp .6
524 529 .RS 4n
525 530 Stop after extracting the first occurrence of the named file. \fBtar\fR
526 531 normally continues reading the archive after finding an occurrence of a file.
527 532 .RE
528 533
529 534 .sp
530 535 .ne 2
531 536 .na
532 537 \fB\fBT\fR\fR
533 538 .ad
534 539 .sp .6
535 540 .RS 4n
536 541 This modifier is only available if the system is configured with Trusted
537 542 Extensions.
538 543 .sp
539 544 When this modifier is used with the function letter \fBc\fR, \fBr,\fR or
540 545 \fBu\fR for creating, replacing or updating a tarfile, the sensitivity label
541 546 associated with each archived file and directory is stored in the tarfile.
542 547 .sp
543 548 Specifying \fBT\fR implies the function modifier \fBp\fR.
544 549 .sp
545 550 When used with the function letter \fBx\fR for extracting a tarfile, the tar
546 551 program verifies that the file's sensitivity label specified in the archive
547 552 equals the sensitivity label of the destination directory. If not, the file is
548 553 not restored. This operation must be invoked from the global zone. If the
549 554 archived file has a relative pathname, it is restored to the corresponding
550 555 directory with the same label, if available. This is done by prepending to the
551 556 current destination directory the root pathname of the zone whose label equals
552 557 the file. If no such zone exists, the file is not restored.
553 558 .sp
554 559 Limited support is provided for extracting labeled archives from Trusted
555 560 Solaris 8. Only sensitivity labels, and multi-level directory specifications
556 561 are interpreted. Privilege specifications and audit attribute flags are
557 562 silently ignored. Multilevel directory specifications including symbolic links
558 563 to single level directories are are mapped into zone-relative pathnames if a
559 564 zone with the same label is available. This support is intended to facilitate
560 565 migration of home directories. Architectural differences preclude the
561 566 extraction of arbitrarily labeled files from Trusted Solaris 8 into identical
562 567 pathnames in Trusted Extensions. Files cannot be extracted unless their
563 568 archived label matches the destination label.
564 569 .RE
565 570
566 571 .sp
567 572 .ne 2
568 573 .na
569 574 \fB\fBv\fR\fR
570 575 .ad
571 576 .sp .6
572 577 .RS 4n
573 578 Verbose. Output the name of each file preceded by the function letter. With the
574 579 \fBt\fR function, \fBv\fR provides additional information about the tarfile
575 580 entries. The listing is similar to the format produced by the \fB-l\fR option
576 581 of the \fBls\fR(1) command.
577 582 .RE
578 583
579 584 .sp
580 585 .ne 2
581 586 .na
582 587 \fB\fBw\fR\fR
583 588 .ad
584 589 .sp .6
585 590 .RS 4n
586 591 What. Output the action to be taken and the name of the file, then await the
587 592 user's confirmation. If the response is affirmative, the action is performed;
588 593 otherwise, the action is not performed. This function modifier cannot be used
589 594 with the \fBt\fR function.
590 595 .RE
591 596
592 597 .sp
593 598 .ne 2
594 599 .na
595 600 \fB\fBX\fR\fR
596 601 .ad
597 602 .sp .6
598 603 .RS 4n
599 604 Exclude. Use the \fIexclude-file\fR argument as a file containing a list of
600 605 relative path names for files (or directories) to be excluded from the tarfile
601 606 when using the functions \fBc\fR, \fBx\fR, or \fBt\fR. Be careful of trailing
602 607 white spaces. Also beware of leading white spaces, since, for each line in the
603 608 excluded file, the entire line (apart from the newline) is used to match
604 609 against the initial string of files to exclude. Lines in the exclude file are
605 610 matched exactly, so an entry like "\fB/var\fR" does \fBnot\fR exclude the
606 611 \fB/var\fR directory if \fBtar\fR is backing up relative pathnames. The entry
607 612 should read "\fB\&./var\fR" under these circumstances. The \fBtar\fR command
608 613 does not expand shell metacharacters in the exclude file, so specifying entries
609 614 like "\fB*.o\fR" does not have the effect of excluding all files with names
610 615 suffixed with "\fB\&.o\fR". If a complex list of files is to be excluded, the
611 616 exclude file should be generated by some means such as the \fBfind\fR(1)
612 617 command with appropriate conditions.
613 618 .sp
614 619 Multiple \fBX\fR arguments can be used, with one \fIexclude-file\fR per
615 620 argument. In the case where included files (see \fB\(miI\fR \fIinclude-file\fR
616 621 operand) are also specified, the excluded files take precedence over all
617 622 included files. If a file is specified in both the \fIexclude-file\fR and the
618 623 \fIinclude-file\fR (or on the command line), it is excluded.
619 624 .RE
620 625
621 626 .sp
622 627 .ne 2
623 628 .na
624 629 \fB\fBz\fR\fR
625 630 .ad
626 631 .sp .6
627 632 .RS 4n
628 633 Use \fBgzip\fR for compressing or decompressing the archives.
629 634 .RE
630 635
631 636 .sp
632 637 .ne 2
633 638 .na
634 639 \fB\fBZ\fR\fR
635 640 .ad
636 641 .sp .6
637 642 .RS 4n
638 643 Use \fBcompress\fR for compressing or decompressing the archives.
639 644 .RE
640 645
641 646 .sp
642 647 .ne 2
643 648 .na
644 649 \fB\fB@\fR\fR
645 650 .ad
646 651 .sp .6
647 652 .RS 4n
648 653 Include extended attributes in archive. By default, \fBtar\fR does not place
649 654 extended attributes in the archive. With this flag, \fBtar\fR looks for
650 655 extended attributes on the files to be placed in the archive and add them to
651 656 the archive. Extended attributes go in the archive as special files with a
652 657 special type label. When this modifier is used with the \fBx\fR function,
653 658 extended attributes are extracted from the tape along with the normal file
654 659 data. Extended attribute files can only be extracted from an archive as part of
655 660 a normal file extract. Attempts to explicitly extract attribute records are
656 661 ignored.
657 662 .RE
658 663
659 664 .sp
660 665 .ne 2
661 666 .na
662 667 \fB\fB/\fR\fR
663 668 .ad
664 669 .sp .6
665 670 .RS 4n
666 671 Include extended system attributes in archive. By default, \fBtar\fR does not
667 672 place extended system attributes in the archive. With this flag, \fBtar\fR
668 673 looks for extended system attributes on the files to be placed in the archive
669 674 and adds them to the archive. Extended system attributes go in the archive as
670 675 special files with a special type label. When this modifier is used with the
671 676 \fBx\fR function, extended system attributes are extracted from the tape along
672 677 with the normal file data. Extended system attribute files can only be
673 678 extracted from an archive as part of a normal file extract. Attempts to
674 679 explicitly extract attribute records are ignored.
675 680 .RE
676 681
677 682 .sp
678 683 .ne 2
679 684 .na
680 685 \fB\fB[0-7]\fR\fR
681 686 .ad
682 687 .sp .6
683 688 .RS 4n
684 689 Select an alternative drive on which the tape is mounted. The default entries
685 690 are specified in \fB/etc/default/tar\fR. If no digit or \fBf\fR function
686 691 modifier is specified, the entry in \fB/etc/default/tar\fR with digit "\fB0\fR"
687 692 is the default.
688 693 .RE
689 694
690 695 .SH USAGE
691 696 .sp
692 697 .LP
693 698 See \fBlargefile\fR(5) for the description of the behavior of \fBtar\fR when
694 699 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
695 700 .sp
696 701 .LP
697 702 The automatic determination of the actual blocking factor can be fooled when
698 703 reading from a pipe or a socket (see the \fBB\fR function modifier below).
699 704 .sp
700 705 .LP
701 706 1/4" streaming tape has an inherent blocking factor of one 512-byte block. It
702 707 can be read or written using any blocking factor.
703 708 .sp
704 709 .LP
705 710 This function modifier works for archives on disk files and block special
706 711 devices, among others, but is intended principally for tape devices.
707 712 .sp
708 713 .LP
709 714 For information on \fBtar\fR header format, see \fBarchives.h\fR(3HEAD).
710 715 .SH EXAMPLES
711 716 .LP
712 717 \fBExample 1 \fRCreating an archive of your home directory
713 718 .sp
714 719 .LP
715 720 The following is an example using \fBtar\fR to create an archive of your home
716 721 directory on a tape mounted on drive \fB/dev/rmt/0\fR:
717 722
718 723 .sp
719 724 .in +2
720 725 .nf
721 726 example% \fBcd\fR
722 727 example% \fBtar cvf /dev/rmt/0\fR .
723 728 \fImessages from\fR tar
724 729 .fi
725 730 .in -2
726 731 .sp
727 732
728 733 .sp
729 734 .LP
730 735 The \fBc\fR function letter means create the archive. The \fBv\fR function
731 736 modifier outputs messages explaining what \fBtar\fR is doing. The \fBf\fR
732 737 function modifier indicates that the tarfile is being specified
733 738 (\fB/dev/rmt/0\fR in this example). The dot (\fB\&.\fR) at the end of the
734 739 command line indicates the current directory and is the argument of the \fBf\fR
735 740 function modifier.
736 741
737 742 .sp
738 743 .LP
739 744 Display the table of contents of the tarfile with the following command:
740 745
741 746 .sp
742 747 .in +2
743 748 .nf
744 749 example% \fBtar tvf /dev/rmt/0\fR
745 750 .fi
746 751 .in -2
747 752 .sp
748 753
749 754 .sp
750 755 .LP
751 756 The output is similar to the following for the POSIX locale:
752 757
753 758 .sp
754 759 .in +2
755 760 .nf
756 761 rw\(mir\(mi\(mir\(mi\(mi 1677/40 2123 Nov 7 18:15 1985 ./test.c
757 762 \&...
758 763 example%
759 764 .fi
760 765 .in -2
761 766 .sp
762 767
763 768 .sp
764 769 .LP
765 770 The columns have the following meanings:
766 771
767 772 .RS +4
768 773 .TP
769 774 .ie t \(bu
770 775 .el o
771 776 column 1 is the access permissions to \fB\&./test.c\fR
772 777 .RE
773 778 .RS +4
774 779 .TP
775 780 .ie t \(bu
776 781 .el o
777 782 column 2 is the \fIuser-id\fR/\fIgroup-id\fR of \fB\&./test.c\fR
778 783 .RE
779 784 .RS +4
780 785 .TP
781 786 .ie t \(bu
782 787 .el o
783 788 column 3 is the size of \fB\&./test.c\fR in bytes
784 789 .RE
785 790 .RS +4
786 791 .TP
787 792 .ie t \(bu
788 793 .el o
789 794 column 4 is the modification date of \fB\&./test.c\fR. When the \fBLC_TIME\fR
790 795 category is not set to the POSIX locale, a different format and date order
791 796 field can be used.
792 797 .RE
793 798 .RS +4
794 799 .TP
795 800 .ie t \(bu
796 801 .el o
797 802 column 5 is the name of \fB\&./test.c\fR
798 803 .RE
799 804 .sp
800 805 .LP
801 806 To extract files from the archive:
802 807
803 808 .sp
804 809 .in +2
805 810 .nf
806 811 example% \fBtar xvf /dev/rmt/0\fR
807 812 \fImessages from\fR tar
808 813 example%
809 814 .fi
810 815 .in -2
811 816 .sp
812 817
813 818 .sp
814 819 .LP
815 820 If there are multiple archive files on a tape, each is separated from the
816 821 following one by an EOF marker. To have \fBtar\fR read the first and second
817 822 archives from a tape with multiple archives on it, the \fInon-rewinding\fR
818 823 version of the tape device name must be used with the \fBf\fR function
819 824 modifier, as follows:
820 825
821 826 .sp
822 827 .in +2
823 828 .nf
824 829 example% \fBtar xvfp /dev/rmt/0n \fIread first archive from tape\fR\fR
825 830 \fImessages from\fR tar
826 831 example% \fBtar xvfp /dev/rmt/0n \fIread second archive from tape\fR\fR
827 832 \fImessages from\fR tar
828 833 example%
829 834 .fi
830 835 .in -2
831 836 .sp
832 837
833 838 .sp
834 839 .LP
835 840 Notice that in some earlier releases, the above scenario did not work
836 841 correctly, and intervention with \fBmt\fR(1) between \fBtar\fR invocations was
837 842 necessary. To emulate the old behavior, use the non-rewind device name
838 843 containing the letter \fBb\fR for BSD behavior. See the \fBClose Operations\fR
839 844 section of the \fBmtio\fR(7I) manual page.
840 845
841 846 .LP
842 847 \fBExample 2 \fRArchiving files from /usr/include and from /etc to default tape
843 848 drive 0
844 849 .sp
845 850 .LP
846 851 To archive files from \fB/usr/include\fR and from \fB/etc\fR to default tape
847 852 drive \fB0\fR:
848 853
849 854 .sp
850 855 .in +2
851 856 .nf
852 857 example% \fBtar c -C /usr include -C /etc .\fR
853 858 .fi
854 859 .in -2
855 860 .sp
856 861
857 862 .sp
858 863 .LP
859 864 The table of contents from the resulting tarfile would produce output like the
860 865 following:
861 866
862 867 .sp
863 868 .in +2
864 869 .nf
865 870 include/
866 871 include/a.out.h
867 872 \fIand all the other files in\fR \fB/usr/include ...\fR
868 873 \&./chown \fIand all the other files in\fR /etc
869 874 .fi
870 875 .in -2
871 876 .sp
872 877
873 878 .sp
874 879 .LP
875 880 To extract all files in the \fBinclude\fR directory:
876 881
877 882 .sp
878 883 .in +2
879 884 .nf
880 885 example% \fBtar xv include
881 886 x include/, 0 bytes, 0 tape blocks \e
882 887 \fIand all files under\fR include ...\fR
883 888 .fi
884 889 .in -2
885 890 .sp
886 891
887 892 .LP
888 893 \fBExample 3 \fRTransferring files across the network
889 894 .sp
890 895 .LP
891 896 The following is an example using \fBtar\fR to transfer files across the
892 897 network. First, here is how to archive files from the local machine
893 898 (\fBexample\fR) to a tape on a remote system (\fBhost\fR):
894 899
895 900 .sp
896 901 .in +2
897 902 .nf
898 903 example% \fBtar cvfb \(mi 20 \fIfiles\fR| \e
899 904 rsh \fIhost\fR dd of=/dev/rmt/0 obs=20b\fR
900 905 \fImessages from\fR tar
901 906 example%
902 907 .fi
903 908 .in -2
904 909 .sp
905 910
906 911 .sp
907 912 .LP
908 913 In the example above, we are \fIcreating\fR a \fItarfile\fR with the \fBc\fR
909 914 key letter, asking for \fIverbose\fR output from \fBtar\fR with the \fBv\fR
910 915 function modifier, specifying the name of the output \fItarfile\fR using the
911 916 \fBf\fR function modifier (the standard output is where the \fItarfile\fR
912 917 appears, as indicated by the `\fB\(mi\fR\&' sign), and specifying the blocksize
913 918 (\fB20\fR) with the \fBb\fR function modifier. If you want to change the
914 919 blocksize, you must change the blocksize arguments both on the \fBtar\fR
915 920 command \fIand\fR on the \fBdd\fR command.
916 921
917 922 .LP
918 923 \fBExample 4 \fRRetrieving files from a tape on the remote system back to the
919 924 local system
920 925 .sp
921 926 .LP
922 927 The following is an example that uses \fBtar\fR to retrieve files from a tape
923 928 on the remote system back to the local system:
924 929
925 930 .sp
926 931 .in +2
927 932 .nf
928 933 example% \fBrsh -n host dd if=/dev/rmt/0 bs=20b | \e
929 934 tar xvBfb \(mi 20 \fIfiles\fR\fR
930 935 \fImessages from\fR tar
931 936 example%
932 937 .fi
933 938 .in -2
934 939 .sp
935 940
936 941 .sp
937 942 .LP
938 943 In the example above, we are \fIextracting\fR from the \fItarfile\fR with the
939 944 \fBx\fR key letter, asking for \fIverbose\fR \fIoutput\fR \fIfrom\fR \fBtar\fR
940 945 with the \fBv\fR function modifier, telling \fBtar\fR it is reading from a pipe
941 946 with the \fBB\fR function modifier, specifying the name of the input
942 947 \fItarfile\fR using the \fBf\fR function modifier (the standard input is where
943 948 the \fItarfile\fR appears, as indicated by the "\fB\(mi\fR" sign), and
944 949 specifying the blocksize (\fB20\fR) with the \fBb\fR function modifier.
945 950
946 951 .LP
947 952 \fBExample 5 \fRCreating an archive of the home directory
948 953 .sp
949 954 .LP
950 955 The following example creates an archive of the home directory on
951 956 \fB/dev/rmt/0\fR with an actual blocking factor of \fB19\fR:
952 957
953 958 .sp
954 959 .in +2
955 960 .nf
956 961 example% \fBtar cvfb /dev/rmt/0 19 $HOME\fR
957 962 .fi
958 963 .in -2
959 964 .sp
960 965
961 966 .sp
962 967 .LP
963 968 To recognize this archive's actual blocking factor without using the \fBb\fR
964 969 function modifier:
965 970
966 971 .sp
967 972 .in +2
968 973 .nf
969 974 example% \fBtar tvf /dev/rmt/0\fR
970 975 tar: blocksize = 19
971 976 \&...
972 977 .fi
973 978 .in -2
974 979 .sp
975 980
976 981 .sp
977 982 .LP
978 983 To recognize this archive's actual blocking factor using a larger nominal
979 984 blocking factor:
980 985
981 986 .sp
982 987 .in +2
983 988 .nf
984 989 example% \fBtar tvf /dev/rmt/0 30\fR
985 990 tar: blocksize = 19
986 991 \&...
987 992 .fi
988 993 .in -2
989 994 .sp
990 995
991 996 .sp
992 997 .LP
993 998 Attempt to recognize this archive's actual blocking factor using a nominal
994 999 blocking factor that is too small:
995 1000
996 1001 .sp
997 1002 .in +2
998 1003 .nf
999 1004 example% \fBtar tvf /dev/rmt/0 10\fR
1000 1005 tar: tape read error
1001 1006 .fi
1002 1007 .in -2
1003 1008 .sp
1004 1009
1005 1010 .SH ENVIRONMENT VARIABLES
1006 1011 .sp
1007 1012 .LP
1008 1013 See \fBenviron\fR(5) for descriptions of the following environment variables
1009 1014 that affect the execution of \fBtar\fR: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
1010 1015 \fBLC_MESSAGES\fR, \fBLC_TIME\fR, \fBTZ\fR, and \fBNLSPATH\fR.
1011 1016 .sp
1012 1017 .LP
1013 1018 Affirmative responses are processed using the extended regular expression
1014 1019 defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
1015 1020 user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
1016 1021 the behavior of ranges, equivalence classes, and multi-character collating
1017 1022 elements used in the expression defined for \fByesexpr\fR. The locale specified
1018 1023 in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
1019 1024 bytes of text data a characters, the behavior of character classes used in the
1020 1025 expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
1021 1026 .SH EXIT STATUS
1022 1027 .sp
1023 1028 .LP
1024 1029 The following exit values are returned:
1025 1030 .sp
1026 1031 .ne 2
1027 1032 .na
1028 1033 \fB\fB0\fR\fR
1029 1034 .ad
1030 1035 .sp .6
1031 1036 .RS 4n
1032 1037 Successful completion.
1033 1038 .RE
1034 1039
1035 1040 .sp
1036 1041 .ne 2
1037 1042 .na
1038 1043 \fB\fB>0\fR\fR
1039 1044 .ad
1040 1045 .sp .6
1041 1046 .RS 4n
1042 1047 An error occurred.
1043 1048 .RE
1044 1049
1045 1050 .SH FILES
1046 1051 .sp
1047 1052 .ne 2
1048 1053 .na
1049 1054 \fB\fB/dev/rmt/[0-7][b][n]\fR\fR
1050 1055 .ad
1051 1056 .sp .6
1052 1057 .RS 4n
1053 1058
1054 1059 .RE
1055 1060
1056 1061 .sp
1057 1062 .ne 2
1058 1063 .na
1059 1064 \fB\fB/dev/rmt/[0-7]l[b][n]\fR\fR
1060 1065 .ad
1061 1066 .sp .6
1062 1067 .RS 4n
1063 1068
1064 1069 .RE
1065 1070
1066 1071 .sp
1067 1072 .ne 2
1068 1073 .na
1069 1074 \fB\fB/dev/rmt/[0-7]m[b][n]\fR\fR
1070 1075 .ad
1071 1076 .sp .6
1072 1077 .RS 4n
1073 1078
1074 1079 .RE
1075 1080
1076 1081 .sp
1077 1082 .ne 2
1078 1083 .na
1079 1084 \fB\fB/dev/rmt/[0-7]h[b][n]\fR\fR
1080 1085 .ad
1081 1086 .sp .6
1082 1087 .RS 4n
1083 1088
1084 1089 .RE
1085 1090
1086 1091 .sp
1087 1092 .ne 2
1088 1093 .na
1089 1094 \fB\fB/dev/rmt/[0-7]u[b][n]\fR\fR
1090 1095 .ad
1091 1096 .sp .6
1092 1097 .RS 4n
1093 1098
1094 1099 .RE
1095 1100
1096 1101 .sp
1097 1102 .ne 2
1098 1103 .na
1099 1104 \fB\fB/dev/rmt/[0-7]c[b][n]\fR\fR
1100 1105 .ad
1101 1106 .sp .6
1102 1107 .RS 4n
1103 1108
1104 1109 .RE
1105 1110
1106 1111 .sp
1107 1112 .ne 2
1108 1113 .na
1109 1114 \fB\fB/etc/default/tar\fR\fR
1110 1115 .ad
1111 1116 .sp .6
1112 1117 .RS 4n
1113 1118 Settings might look like this:
1114 1119 .br
1115 1120 .in +2
1116 1121 \fBarchive0=/dev/rmt/0\fR
1117 1122 .in -2
1118 1123 .br
1119 1124 .in +2
1120 1125 \fBarchive1=/dev/rmt/0n\fR
1121 1126 .in -2
1122 1127 .br
1123 1128 .in +2
1124 1129 \fBarchive2=/dev/rmt/1\fR
1125 1130 .in -2
1126 1131 .br
1127 1132 .in +2
1128 1133 \fBarchive3=/dev/rmt/1n\fR
1129 1134 .in -2
1130 1135 .br
1131 1136 .in +2
1132 1137 \fBarchive4=/dev/rmt/0\fR
1133 1138 .in -2
1134 1139 .br
1135 1140 .in +2
1136 1141 \fBarchive5=/dev/rmt/0n\fR
1137 1142 .in -2
1138 1143 .br
1139 1144 .in +2
1140 1145 \fBarchive6=/dev/rmt/1\fR
1141 1146 .in -2
1142 1147 .br
1143 1148 .in +2
1144 1149 \fBarchive7=/dev/rmt/1n\fR
1145 1150 .in -2
1146 1151 .RE
1147 1152
1148 1153 .sp
1149 1154 .ne 2
1150 1155 .na
1151 1156 \fB\fB/tmp/tar*\fR\fR
1152 1157 .ad
1153 1158 .sp .6
1154 1159 .RS 4n
1155 1160
1156 1161 .RE
1157 1162
1158 1163 .SH ATTRIBUTES
1159 1164 .sp
1160 1165 .LP
1161 1166 See \fBattributes\fR(5) for descriptions of the following attributes:
1162 1167 .sp
1163 1168
1164 1169 .sp
1165 1170 .TS
1166 1171 box;
1167 1172 c | c
1168 1173 l | l .
1169 1174 ATTRIBUTE TYPE ATTRIBUTE VALUE
1170 1175 _
1171 1176 CSI Enabled
1172 1177 _
1173 1178 Interface Stability Committed
1174 1179 .TE
1175 1180
1176 1181 .SH SEE ALSO
1177 1182 .sp
1178 1183 .LP
1179 1184 \fBar\fR(1), \fBbasename\fR(1), \fBbzip2\fR(1), \fBcd\fR(1), \fBchown\fR(1),
1180 1185 \fBcompress\fR)(1), \fBcpio\fR(1), \fBcsh\fR(1), \fBdirname\fR(1),
1181 1186 \fBfind\fR(1), \fBgzip\fR(1), \fBls\fR(1), \fBmt\fR(1), \fBpax\fR(1),
1182 1187 \fBsetfacl\fR(1), \fBumask\fR(1), \fBxz\fR(1), \fBmknod\fR(1M),
1183 1188 \fBarchives.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
1184 1189 \fBfsattr\fR(5), \fBlargefile\fR(5), \fBmtio\fR(7I)
1185 1190 .SH DIAGNOSTICS
1186 1191 .sp
1187 1192 .LP
1188 1193 Diagnostic messages are output for bad key characters and tape read/write
1189 1194 errors, and for insufficient memory to hold the link tables.
1190 1195 .SH NOTES
1191 1196 .sp
1192 1197 .LP
1193 1198 There is no way to access the \fIn\fR-th occurrence of a file.
1194 1199 .sp
1195 1200 .LP
1196 1201 Tape errors are handled ungracefully.
1197 1202 .sp
1198 1203 .LP
1199 1204 The \fBtar\fR archive format allows \fBUID\fRs and \fBGID\fRs up to
1200 1205 \fB2097151\fR to be stored in the archive header. Files with \fBUID\fRs and
1201 1206 \fBGID\fRs greater than this value is archived with the \fBUID\fR and \fBGID\fR
1202 1207 of \fB60001\fR.
1203 1208 .sp
1204 1209 .LP
1205 1210 If an archive is created that contains files whose names were created by
1206 1211 processes running in multiple locales, a single locale that uses a full 8-bit
1207 1212 codeset (for example, the \fBen_US\fR locale) should be used both to create the
1208 1213 archive and to extract files from the archive.
1209 1214 .sp
1210 1215 .LP
1211 1216 Neither the \fBr\fR function letter nor the \fBu\fR function letter can be used
1212 1217 with quarter-inch archive tapes, since these tape drives cannot backspace.
1213 1218 .sp
1214 1219 .LP
1215 1220 Since \fBtar\fR has no options, the standard "\fB\(mi\(mi\fR" argument that is
1216 1221 normally used in other utilities to terminate recognition of options is not
1217 1222 needed. If used, it is recognized only as the first argument and is ignored.
1218 1223 .sp
1219 1224 .LP
1220 1225 Since \fB\(miC\fR \fIdirectory\fR \fIfile\fR and \fB\(miI\fR \fIinclude-file\fR
1221 1226 are multi-argument operands, any of the following methods can be used to
1222 1227 archive or extract a file named \fB\(miC\fR or \fB\(miI\fR:
1223 1228 .RS +4
1224 1229 .TP
1225 1230 1.
1226 1231 Specify them using file operands containing a \fB/\fR character on the
1227 1232 command line (such as \fB/home/joe/\(miC\fR or \fB\&./\(miI\fR).
1228 1233 .RE
1229 1234 .RS +4
1230 1235 .TP
1231 1236 2.
1232 1237 Include them in an include file with \fB\(miI\fR \fIinclude-file\fR.
1233 1238 .RE
1234 1239 .RS +4
1235 1240 .TP
1236 1241 3.
1237 1242 Specify the directory in which the file resides:
1238 1243 .sp
1239 1244 .in +2
1240 1245 .nf
1241 1246 \fB-C \fIdirectory\fR -C\fR
1242 1247 .fi
1243 1248 .in -2
1244 1249 .sp
1245 1250
1246 1251 or
1247 1252 .sp
1248 1253 .in +2
1249 1254 .nf
1250 1255 \fB-C \fIdirectory\fR -I\fR
1251 1256 .fi
1252 1257 .in -2
1253 1258 .sp
1254 1259
1255 1260 .RE
1256 1261 .RS +4
1257 1262 .TP
1258 1263 4.
1259 1264 Specify the entire directory in which the file resides:
1260 1265 .sp
1261 1266 .in +2
1262 1267 .nf
1263 1268 \fB-C \fIdirectory\fR .\fR
1264 1269 .fi
1265 1270 .in -2
1266 1271 .sp
1267 1272
1268 1273 .RE
↓ open down ↓ |
1175 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX