1 .\" $XConsortium: pax.1 /main/3 1995/11/01 17:01:42 rswiston $
4 .\" AT&T Bell Laboratories
6 .\" @(#)pax.1 (gsf@research.att.com) 01/11/95
10 pax \- portable archive interchange
22 .RI / old / new /[glpsu]
41 .RI / old / new /[glpsu]
58 .RI / old / new /[glpsu]
65 reads and writes archive files in various formats.
66 There are four operation modes controlled by combinations of the
73 writes the files and directories named by the
75 arguments to the standard output together with
76 pathname and status information.
79 argument refers to the files and (recursively) subdirectories
83 arguments are given then the standard input is read to get
84 a list of pathnames to copy, one pathname per line.
85 In this case only those pathnames appearing on the standard input are copied.
88 reads files from the standard input that is assumed
89 to be the result of a previous
92 Only files with names that match any of the
94 arguments are selected.
97 is given in the name-generating notation of
101 character is also matched.
106 which selects all files.
107 The selected files are conditionally created and copied relative
108 to the current directory tree, subject to the options described below.
109 By default the owner and group of selected files will be that of the
110 current user, and the permissions and modify times will be the same
111 as those in the archive.
114 option is omitted then a table of contents of the selected files is
115 listed on the standard output.
118 reads the files and directories named in the
120 arguments and copies them to the destination
124 argument refers to the files and (recursively) subdirectories
128 arguments are given then the standard input is read to get
129 a list of pathnames to copy, one pathname per line.
130 In this case only those pathnames appearing on the standard input are copied.
132 must exist before the copy.
134 The standard archive formats are automatically detected on input.
135 The default output archive format is implementation defined,
136 but may be overridden by the
138 option described below.
140 archives may be concatenated to combine multiple volumes on a single
142 This is accomplished by forcing any format prescribed pad data to be null bytes.
143 Hard links are not maintained between volumes, and
144 delta and base archives cannot be multi-volume.
146 A single archive may span many files/devices.
147 The second and subsequent file names are prompted for on the terminal input.
155 and prompt again for file name.
158 Exit without further processing.
161 An empty input line retains the previous file name.
164 The file name for the next archive part.
170 append files to the end of the archive.
174 is the pathname of the input or output archive, overriding the default
179 or standard output for
182 \fBs\fP /\fIold\fP/\fInew\fP/[\fBglpu\fP]
183 File names and symbolic link text are mapped according
186 style substitution expression.
187 Any non-null character may be used as a delimiter
192 expressions may be specified; the expressions are applied from left to right.
195 converts the matched string to lower case.
198 causes successful mappings to be listed on the standard error.
201 stops the substitutions on the current name if the substitution
205 converts the matched string to upper case.
206 File names that substitute to the null string are ignored on
207 both input and output.
210 option inhibits symbolic link text substitution.
213 Produces a verbose table of contents listing on the standard output when both
218 Otherwise the file names are listed on the standard error
219 as they are encountered.
222 Specifies the output archive
226 then the standard input is treated as an archive that is converted to a
228 archive on the standard output.
229 The input format, which must be one of the following,
230 is automatically determined.
231 The default output format, named by
240 ANSI standard label tape format.
241 Only regular files with simple pathnames are archived.
242 Valid only for blocked devices.
256 character format with header checksum.
257 This format is misnamed
266 binary format with symbolic links.
267 This format is obsolete and should not be used on output.
272 character format with symbolic links.
273 This is the default output format.
276 EBCDIC standard label tape format.
277 Only regular files with simple pathnames are archived.
278 Valid only for tape devices.
281 The IEEE 1003.1b-1990 interchange format, partially compatible with
282 the X3.27 standard labeled tape format.
285 The s5r2 portable object library format.
289 The BSD ranlib object library format.
295 format with symbolic links.
298 The POSIX IEEE Std 1003.1-1988 tar format.
302 .I "virtual database"
309 ANSI standard label VMS backup savset tape format.
310 Valid only for input tape devices.
313 Formats can be defined as extensions to the builtin formats.
314 For any non-builtin format
319 .SS "Extended Options"
320 All options have long string names specified using
322 .RI [no] name [= value ];
328 append files to the end of the archive.
331 Preserve the access time of all files.
336 Set the output blocking size.
339 suffix) is specified then
341 is in 1 character units.
350 by 1024 (1 kilobyte) and an
354 by 1048576 (1 megabyte).
356 is automatically determined on input and is ignored for
362 for block and character special archive files and
363 implementation defined otherwise.
373 the pattern arguments are treated as ordinary file names.
374 Only the first occurrence of each of these files in the
375 input archive is read.
377 exits with zero exit status after all files in the list have been read.
378 If one or more files in the list is not found,
380 writes a message to standard error for each of these files
381 and exits with a non-zero exit status.
382 The file names are compared before any pathname transformations are applied.
385 File modification times are not retained.
388 Restore file ownership as specified in the archive.
389 The current user must have appropriate privileges.
390 .SS "Compatibility Options"
391 These options provide functional compatibility with the old
398 Complement the match sense of the
403 Intermediate directories not explicitly listed in the archive
410 A file is skipped if a null line is entered and
419 files are linked rather than copied when possible.
422 Preserve the access times of input files after they have been copied.
426 is an identifier that names the input or output archive device,
427 overriding the default standard input for
429 or standard output for
431 Tape devices may be specified as
432 .IR drive [ density\|rewind ]
435 is a drive number in the range [0\-7],
446 (1600 bpi \- default)
454 to inhibit rewinding of the tape device when it is closed.
457 are implementation defined.
460 Copy each file only if it is newer than a pre-existing file with the same name.
465 Interactively prompt for the disposition of each file.
467 or an input line starting with
472 Otherwise an input line starting with anything other than
474 causes the file to be ignored.
475 .SS "Extended Options"
476 These options provide fine archive control, including delta archive operations.
481 command on each file to be output.
482 The current name of the file to be output is appended to the filter command
483 string before the command is executed by the shell.
486 Inhibit archive heading and summmary information messages to stderr.
491 continue processing the archive after encountering an error by attempting
492 to locate the next valid entry.
493 This is useful for archives stored on unreliable media.
496 Specifies the delta base archive
498 that is assumed to be the result of a previous
503 the input files are compared with the files in
505 and file delta information is placed in the output archive
506 using the delta algorithm.
509 the delta information in the input archive is used to update the
510 output files with respect to the files in
514 the delta information in the archive on the standard input is used
515 to generate an archive on the standard output whose entries are updated
516 with respect to the files in
522 or an empty file then the input files are simply compressed.
524 must also be specified to produce a compressed archive for
528 Sets the maximum archive part output character count.
530 prompts for the next archive part file name.
535 Archive entries smaller than
537 must be contained within a single part.
542 Copy a logical view of the input files.
543 Symbolic links are followed, causing the pointed to files to be copied
544 rather than the symbolic link information.
552 This message is used to prompt interactively for the next tape
553 reel or cartridge in cases where the tape runs out before
554 all files have been copied.
558 style integer format specification that is replaced with the
562 Copy a physical view of the input files.
563 Causes symbolic link information to be copied as opposed to the
564 default (logical view) action of following symbolic links
565 and copying the pointed to files.
567 \fBR\fP \fIoption\fP[\fIvalue\fP][,\fIoption\fP[\fIvalue\fP]...]
568 Set record oriented format options.
569 Multiple options may be concatenated using
571 Some options may be fixed for some formats.
577 Record data is subject to character set conversions.
580 Set the output record format to
582 The supported record formats are:
586 Variable length with 4 byte record header.
587 The record size default is 512.
590 Fixed length with no record header.
591 The record size default is 128.
594 Spanned variable length with 4 byte record header.
595 The record size default is 0 (no limit).
598 Variable length with no record header.
599 The output block size matches the size of each output record.
600 The record size default is 512.
603 Spanned variable length with binary 4 byte record header.
604 The record size default is 0 (no limit).
612 Only those files with input record format matching
617 Partial output blocks are padded to the full blocksize.
620 Set the output record size to
623 should divide the output blocking.
626 Set the output volume label to
628 Some formats may truncate and/or case-convert
636 except that symbolic links are created.
639 Set file ownership to the default of the user named
641 Valid only for the super-user.
644 Output a `.' as each file is encountered.
650 Do not cross mount points when searching for files to output.
652 The number of files, blocks, and optionally the number of volumes and
653 media parts are listed on the standard error.
656 the input archive formats are also listed on the standard error.
659 .B "pax \-w \-t 1m ."
660 Copies the contents of the current directory to tape drive 1, medium density.
667 .BI "pax \-rw ." " newdir"
671 directory hierarchy to
674 ar(1), cpio(1), find(1), ksh(1), tar(1), tw(1), libdelta(3), cpio(5), tar(5)
676 Special privileges may be required to copy special files.
678 Each archive format has a hard upper limit on member pathname sizes.
680 Device, user-id and group-id numbers larger than 65535 cause additional
681 header records to be output.
682 These records are ignored by old versions of