1 .\" $Id: pax.1,v 1.2 89/02/12 10:08:47 mark Exp $
2 .TH PAX 1 "USENIX Association" ""
4 pax \- portable archive exchange
9 .RI "[\fB\-f\fR" " archive" ]
10 .RI "[\fB\-s\fR" " replstr" ]
11 .RI "[\fB\-t\fR" " device" ]
13 .TP \w'\fBpax\ \-r\fR\ 'u
16 .RI "[\fB\-f\fR" " archive" ]
17 .RI "[\fB\-s\fR" " replstr" ]
18 .RI "[\fB\-t\fR" " device" ]
20 .TP \w'\fBpax\ \-w\fR\ 'u
23 .RI "[\fB\-b\fR" " blocking" ]
24 .RI "[\fB\-f\fR" " archive" ]
25 .RI "[\fB\-s\fR" " replstr" ]
26 .RI "[\fB\-t\fR" " device" ]
27 .RI "[\fB\-x\fR" " format" ]
29 .TP \w'\fBpax\ \-rw\fR\ 'u
32 .RI "[\fB\-s\fR" " replstr" ]
37 reads and writes archive files which conform to the
38 .B "Archive/Interchange File Format"
40 .IR "IEEE Std. 1003.1-1988" .
42 can also read, but not write, a number of other file formats
43 in addition to those specified in the
44 .B "Archive/Interchange File Format"
46 Support for these traditional file formats, such as V7
51 is provided for backward compatibility and to maximize portability.
54 will also support traditional
59 interfaces if invoked with the name
60 "cpio" or "tar" respectively.
65 manual pages for more details.
71 command line arguments specify whether
73 will read, write or list the contents of the specified archive,
74 or move the specified files to another directory.
76 The command line arguments are:
79 writes the files and directories specified by
81 operands to the standard output together with the pathname and status
82 information prescribed by the archive format used.
85 operand refers to the files and (recursively) subdirectories of that
89 operands are given, then the standard input is read to get a
90 list of pathnames to copy, one pathname per line.
91 In this case, only those pathnames appearing on the standard input are
96 reads an archive file from the standard input.
97 Only files with names that match any of the
99 operands are selected for extraction.
100 The selected files are conditionally created and copied relative to the
101 current directory tree, subject to the options described below.
102 By default, the owner and group of selected files will be that of the
103 invoking process, and the permissions and modification times will be the
104 sames as those in the archive.
107 The supported archive formats are automatically detected on input.
108 The default output format is
110 but may be overridden by the
113 option described below.
118 reads the files and directories named in the
120 operands and copies them to the destination
124 operand refers to the files and (recursively) subdirectories of that
128 operands are given, the standard input is read to get a list of pathnames
129 to copy, one pathname per line.
130 In this case, only those pathnames appearing on the standard input are
132 The directory named by the
134 operand must exist and have the proper permissions before the copy can
139 options are given, then
141 will list the contents of the specified archive.
144 lists normal files one per line, hard link pathnames as
147 .IR pathname " == " linkname
150 and symbolic link pathnames (if supported by the implementation) as
153 .IR pathname " -> " linkname
158 is the name of the file being extracted, and
160 is the name of a file which appeared earlier in the archive.
164 option is specified, then
166 list normal pathnames in the same format used by the
171 Hard links are shown as
174 .IR "<ls -l listing>" " == " linkname
177 and symbolic links (if supported) are shown as
180 .IR "<ls -l listing>" " -> " linkname
185 is capable of reading and writing archives which span multiple physical
187 Upon detecting an end of medium on an archive which is not yet completed,
189 will prompt the user for the next volume of the archive and will allow the
190 user to specify the location of the next volume.
192 The following options are available:
195 The files specified by
197 are appended to the specified archive.
202 bytes per write to the archive file.
215 by 1048576 (1 megabyte).
216 For machines with 16-bit int's (VAXen, XENIX-286, etc.),
217 the maximum buffer size is 32k-1.
220 is automatically determined on input and is ignored for
224 Complement the match sense of the
229 Intermediate directories not explicitly listed in the archive are not
231 This option is ignored unless
239 option specifies the pathname of the input or output archive,
240 overriding the default of standard input for
242 or standard output for
246 Interactively rename files.
247 Substitutions specified by
249 options (described below)
250 are performed before requesting the new file name from the user.
251 A file is skipped if an empty line is entered and
253 exits with an exit status of 0 if
258 Files are linked rather than copied when possible.
261 File modification times are not retained.
270 arguments are treated as ordinary file names.
271 Only the first occurrence of each of these files in the input archive
275 utility exits with a zero exit status after all files in the list have been
277 If one or more files in the list is not found,
279 writes a diagnostic to standard error for each of the files and exits with
280 a non-zero exit status.
281 the file names are compared before any of the
289 Restore file ownership as specified in the archive.
290 The invoking process must have appropriate privileges to accomplish this.
293 Preserve the access time of the input files after they have been copied.
296 File names are modified according to the substitution expression using the
302 -s /\fIold\fR/\fInew\fR/\fB[\fRgp\fB]\fR
306 Any non null character may be used as a delimiter (a / is used here as an
310 expressions may be specified; the expressions are applied in the order
311 specified terminating with the first successful substitution.
312 The optional trailing
314 causes successful mappings to be listed on standard error.
315 The optional trailing
319 expression to be replaced each time it occurs in the source string.
320 Files that substitute to an empty string are ignored both on input and
327 option argument is an implementation-defined identifier that names the input
328 or output archive device, overriding the default of standard input for
330 and standard output for
334 Copy each file only if it is newer than a pre-existing file with the same
340 List file names as they are encountered.
341 Produces a verbose table of contents listing on the standard output when both
346 otherwise the file names are printed to standard error as they are
347 encountered in the archive.
350 Specifies the output archive
352 The input format, which must be one of the following, is automatically
356 The supported formats are:
362 interchange format specified in
363 .B "Extended CPIO Format" in
364 .I "IEEE Std. 1003.1-1988."
369 interchange format specified in
370 .B "Extended TAR Format" in
371 .I "IEEE Std. 1003.1-1988."
372 This is the default archive format.
376 Interactively prompt for the disposition of each file.
377 Substitutions specified by
379 options (described above)
380 are performed before prompting the user for disposition.
382 or an input line starting with the character
387 Otherwise, an input line starting with anything other than
389 causes the file to be ignored.
390 This option cannot be used in conjunction with the
394 Only the last of multiple
400 When writing to an archive, the
401 standard input is used as a list of pathnames if no
403 operands are specified.
404 The format is one pathname per line.
405 Otherwise, the standard input is the archive file,
406 which is formatted according to one of the specifications in
407 .B "Archive/Interchange File format"
409 .IR "IEEE Std. 1003.1-1988" ,
410 or some other implementation-defined format.
412 The user ID and group ID of the process, together with the appropriate
413 privileges, affect the ability of
415 to restore ownership and permissions attributes of the archived files.
417 .I "format-reading utility"
419 .B "Archive/Interchange File Format"
421 .IR "IEEE Std. 1003.1-1988" ".)"
434 are provided for functional compatibility with the historical
439 The option defaults were chosen based on the most common usage of these
440 options, therefore, some of the options have meanings different than
441 those of the historical commands.
443 The following operands are available:
446 The destination directory pathname for copies when both the
450 options are specified.
451 The directory must exist and be writable before the copy or and error
455 A file whose contents are used instead of the files named on the standard
457 When a directory is named, all of its files and (recursively)
464 is given in the standard shell pattern matching notation.
469 which selects all files.
471 The following command
474 pax \-w \-f /dev/rmt0 \.
477 copies the contents of the current directory to tape drive 0.
486 .RI "pax -rw . " newdir
489 copies the contents of
497 pax \-r \-s ',//*usr//*,,' -f pax.out
502 with all files rooted in "/usr" in the archive extracted
503 relative to the current directory.
507 used to prompt the user for information when the
509 options are specified.
511 cpio(1), find(1), tar(1), cpio(5), tar(5)
514 will terminate immediately, without processing any
515 additional files on the command line or in the archive.
518 will exit with one of the following values:
520 All files in the archive were processed successfully.
523 aborted due to errors encountered during operation.
525 Special permissions may be required to copy or extract special files.
527 Device, user ID, and group ID numbers larger than 65535 cause additional
528 header records to be output.
529 These records are ignored by some historical version of
534 The archive formats described in
535 .B "Archive/Interchange File Format"
536 have certain restrictions that have
537 been carried over from historical usage.
538 For example, there are restrictions on the length of pathnames stored in
541 When getting an "ls -l" style listing on
543 format archives, link counts are listed as zero since the
545 archive format does not keep link count information.
547 On 16 bit architectures, the largest buffer size is 32k-1.
548 This is due, in part, to using integers in the buffer allocation schemes,
549 however, on many of these machines, it is not possible to allocate blocks
550 of memory larger than 32k.
552 Copyright (c) 1989 Mark H. Colburn.
556 Redistribution and use in source and binary forms are permitted
557 provided that the above copyright notice is duplicated in all such
558 forms and that any documentation, advertising materials, and other
559 materials related to such distribution and use acknowledge that the
560 software was developed by Mark H. Colburn and sponsored by The
563 THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
564 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
565 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
569 Minnetech Consulting, Inc.
571 117 Mackubin Street, Suite 1
578 .B "The USENIX Association"
579 for public distribution.