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