|
|
1.1 root 1: .\"
2: .\" G. S. Fowler
3: .\" AT&T Bell Laboratories
4: .\"
5: .\" @(#)pax.1 (ulysses!gsf) 01/11/90
6: .\"
7: .TH PAX 1
8: .SH NAME
9: pax \- portable archive interchange
10: .SH SYNOPSIS
11: .B pax
12: [
13: .B \-rmnov
14: ] [
15: .B \-f
16: .I archive
17: ] [
18: .B \-s
19: .RI / old / new /[gp]
20: ] [
21: .I "pattern ..."
22: ]
23: .LP
24: .B pax
25: .B \-w
26: [
27: .B mv
28: ] [
29: .B \-b
30: .I blocking
31: ] [
32: .B \-f
33: .I archive
34: ] [
35: .B \-s
36: .RI / old / new /[gp]
37: ] [
38: .B \-x
39: .I format
40: ] [
41: .I "pathname ..."
42: ]
43: .LP
44: .B pax
45: .B \-rw
46: [
47: .B mov
48: ] [
49: .B \-s
50: .RI / old / new /[gp]
51: ] [
52: .I "pathname ..."
53: ]
54: .I directory
55: .SH DESCRIPTION
56: .I pax
57: reads and writes archive files in various formats.
58: There are four operation modes controlled by combinations of the
59: .B \-r
60: and
61: .B \-w
62: options.
63: .PP
64: .B "pax \-w"
65: writes the files and directories named by the
66: .I pathname
67: arguments to the standard output together with
68: pathname and status information.
69: A directory
70: .I pathname
71: argument refers to the files and (recursively) subdirectories
72: of that directory.
73: If no
74: .I pathname
75: arguments are given then the standard input is read to get
76: a list of pathnames to copy, one pathname per line.
77: In this case only those pathnames appearing on the standard input are copied.
78: .PP
79: .B "pax \-r"
80: reads files from the standard input that is assumed
81: to be the result of a previous
82: .B "pax \-w"
83: command.
84: Only files with names that match any of the
85: .I pattern
86: arguments are selected.
87: A
88: .I pattern
89: is given in the name-generating notation of
90: .IR sh (1),
91: except that the
92: .B /
93: character is also matched.
94: The default if no
95: .I pattern
96: is given is
97: .BR * ,
98: which selects all files.
99: The selected files are conditionally created and copied relative
100: to the current directory tree, subject to the options described below.
101: By default the owner and group of selected files will be that of the
102: current user, and the permissions and modify times will be the same
103: as those in the archive.
104: If the
105: .B \-r
106: option is omitted then a table of contents of the selected files is
107: listed on the standard output.
108: .PP
109: .B "pax \-rw"
110: reads the files and directories named in the
111: .I pathname
112: arguments and copies them to the destination
113: .IR directory .
114: A directory
115: .I pathname
116: argument refers to the files and (recursively) subdirectories
117: of that directory.
118: If no
119: .I pathname
120: arguments are given then the standard input is read to get
121: a list of pathnames to copy, one pathname per line.
122: In this case only those pathnames appearing on the standard input are copied.
123: .I directory
124: must exist before the copy.
125: .PP
126: The standard archive formats are automatically detected on input.
127: The default output archive format is implementation defined,
128: but may be overridden by the
129: .B \-x
130: option described below.
131: .I pax
132: archives may be concatenated to combine multiple volumes on a single
133: tape or file.
134: This is accomplished by forcing any format prescribed pad data to be null bytes.
135: Hard links are not maintained between volumes, and
136: delta and base archives cannot be multi-volume.
137: .PP
138: A single archive may span many files/devices.
139: The second and subsequent file names are prompted for on the terminal input.
140: The response may be:
141: .TP
142: .BI ! command
143: Execute
144: .I command
145: via
146: .IR system (3)
147: and prompt again for file name.
148: .TP
149: .B EOF
150: Exit without further processing.
151: .TP
152: .B CR
153: An empty input line retains the previous file name.
154: .TP
155: .I pathname
156: The file name for the next archive part.
157: .SS "Basic Options"
158: These options support basic archive operations.
159: .TP
160: .BI b " blocking"
161: Set the output blocking size.
162: If no suffix (or a
163: .B c
164: suffix) is specified then
165: .I blocking
166: is in 1 character units.
167: A
168: .B b
169: suffix multiplies
170: .I blocking
171: by 512 (1 block), a
172: .B k
173: suffix multiplies
174: .I blocking
175: by 1024 (1 kilobyte) and an
176: .B m
177: suffix multiplies
178: .I blocking
179: by 1048576 (1 megabyte).
180: .I blocking
181: is automatically determined on input and is ignored for
182: .BR \-rw .
183: The default
184: .I blocking
185: is
186: .B 10k
187: for block and character special archive files and
188: implementation defined otherwise.
189: The minimum
190: .I blocking
191: is
192: .BR 1c .
193: .TP
194: .BI f " archive"
195: .I archive
196: is the pathname of the input or output archive, overriding the default
197: standard input for
198: .B \-r
199: and
200: .B \-rw
201: or standard output for
202: .BR \-w .
203: .TP
204: .B m
205: File modification times are not retained.
206: .TP
207: .B n
208: For
209: .B \-r
210: the pattern arguments are treated as ordinary file names.
211: Only the first occurrence of each of these files in the
212: input archive is read.
213: .I pax
214: exits with zero exit status after all files in the list have been read.
215: If one or more files in the list is not found,
216: .I pax
217: writes a message to standard error for each of these files
218: and exits with a non-zero exit status.
219: The file names are compared before any of the
220: .B \-i,
221: .B \-s,
222: or
223: .B \-y
224: options are applied.
225: .TP
226: .B o
227: Restore file ownership as specified in the archive.
228: The current user must have appropriate privileges.
229: .TP
230: \fBs\fP /\fIold\fP/\fInew\fP/[\fIglpu\fP]
231: File names and symbolic link text are mapped according
232: to the
233: .IR ed (1)
234: style substitution expression.
235: Any non-null character may be used as a delimiter
236: .RB ( /
237: shown here).
238: Multiple
239: .B \-s
240: expressions may be specified; the expressions are applied from left to right,
241: terminating with the first successful substitution.
242: A trailing
243: .B l
244: converts the matched string to lower case.
245: A trailing
246: .B p
247: causes successful mappings to be listed on the standard error.
248: A trailing
249: .B u
250: converts the matched string to upper case.
251: File names that substitute to the null string are ignored on
252: both input and output.
253: The
254: .B \-P
255: option inhibits symbolic link text substitution.
256: .TP
257: .B v
258: Produces a verbose table of contents listing on the standard output when both
259: .B \-r
260: and
261: .B \-w
262: are omitted.
263: Otherwise the file names are listed on the standard error
264: as they are encountered.
265: .TP
266: .BI x " format"
267: Specifies the output archive
268: .IR format .
269: If specified with
270: .B \-rw
271: then the standard input is treated as an archive that is converted to a
272: .I format
273: archive on the standard output.
274: The input format, which must be one of the following,
275: is automatically determined.
276: The default output format, named by
277: .BR \- ,
278: is
279: .BR cpio .
280: The formats are:
281: .RS
282: .PD 0
283: .TP
284: .B asc
285: The
286: .B s5r4
287: extended
288: .IR cpio (5)
289: character format.
290: .TP
291: .B ansi
292: ANSI standard label tape format.
293: Only regular files with simple pathnames are archived.
294: Valid only for blocked devices.
295: .TP
296: .B asc
297: The
298: .B s5r4
299: extended
300: .IR cpio (5)
301: character format.
302: .TP
303: .B aschk
304: The
305: .B s5r4
306: extended
307: .IR cpio (5)
308: character format with header checksum.
309: This format is misnamed
310: .B crc
311: in the
312: .B s5r4
313: documentation.
314: .TP
315: .B binary
316: The
317: .IR cpio (5)
318: binary format with symbolic links.
319: This format is obsolete and should not be used on output.
320: .TP
321: .B cpio
322: The
323: .IR cpio (5)
324: character format with symbolic links.
325: This is the default output format.
326: .TP
327: .B ibmar
328: EBCDIC standard label tape format.
329: Only regular files with simple pathnames are archived.
330: Valid only for tape devices.
331: .TP
332: .B posix
333: The IEEE 1003.1b-1990 interchange format, partially compatible with
334: the X3.27 standard labeled tape format.
335: .TP
336: .B portarch
337: The svr2 portable object library format.
338: Valid only on input.
339: .TP
340: .B randarch
341: The BSD ranlib object library format.
342: Valid only on input.
343: .TP
344: .B tar
345: The
346: .IR tar (5)
347: format with symbolic links.
348: .TP
349: .B ustar
350: The POSIX IEEE Std 1003.1-1988 tar format.
351: .TP
352: .B vmsbackup
353: ANSI standard label VMS backup savset tape format.
354: Valid only for input tape devices.
355: .PD
356: .RE
357: .SS "Compatibility Options"
358: These options provide functional compatibility with the old
359: .IR cpio (1)
360: and
361: .IR tar (1)
362: commands.
363: .TP
364: .B a
365: For
366: .B \-w
367: append files to the end of the archive.
368: .TP
369: .B c
370: Complement the match sense of the
371: .I pattern
372: arguments.
373: .TP
374: .B d
375: Intermediate directories not explicitly listed in the archive
376: are not created.
377: .TP
378: .B i
379: Interactively
380: .I rename
381: files.
382: A file is skipped if a null line is entered and
383: .I pax
384: exits if
385: .B EOF
386: is encountered.
387: .TP
388: .B l
389: For
390: .BR \-rw ,
391: files are linked rather than copied when possible.
392: .TP
393: .B p
394: Preserve the access times of input files after they have been copied.
395: .TP
396: .BI t " device"
397: .I device
398: is an identifier that names the input or output archive device,
399: overriding the default standard input for
400: .B \-r
401: or standard output for
402: .BR \-w .
403: Tape devices may be specified as
404: .IR drive [ density\|rewind ]
405: where
406: .I drive
407: is a drive number in the range [0\-7],
408: .I density
409: is one of
410: .BR l ,
411: .B m
412: and
413: .B h
414: for
415: .B low
416: (800 bpi),
417: .B medium
418: (1600 bpi \- default)
419: and
420: .B high
421: (6250 bpi)
422: tape densities and
423: .I rewind
424: is
425: .B n
426: to inhibit rewinding of the tape device when it is closed.
427: Other forms for
428: .I device
429: are implementation defined.
430: .TP
431: .B u
432: Copy each file only if it is newer than a pre-existing file with the same name.
433: This option implies
434: .BR \-a .
435: .TP
436: .B y
437: Interactively prompt for the disposition of each file.
438: .B EOF
439: or an input line starting with
440: .B q
441: causes
442: .I pax
443: to exit.
444: Otherwise an input line starting with anything other than
445: .B y
446: causes the file to be ignored.
447: .SS "Extended Options"
448: These options provide fine archive control, including delta archive operations.
449: .TP
450: .BI e " filter"
451: Run the
452: .I filter
453: command on each file to be output.
454: The current name of the file to be output is appended to the filter command
455: string before the command is executed by the shell.
456: .TP
457: .B h
458: Inhibit archive heading and summmary information messages to stderr.
459: .TP
460: .B k
461: For
462: .B \-r
463: continue processing the archive after encountering an error by attempting
464: to locate the next valid entry.
465: This is useful for archives stored on unreliable media.
466: .TP
467: .BI z " base"
468: Specifies the delta base archive
469: .I base
470: that is assumed to be the result of a previous
471: .B "pax \-w"
472: command.
473: For
474: .B \-w
475: the input files are compared with the files in
476: .I base
477: and file delta information is placed in the output archive
478: using the delta algorithm.
479: For
480: .B \-r
481: the delta information in the input archive is used to update the
482: output files with respect to the files in
483: .IR base .
484: For
485: .B \-rw
486: the delta information in the archive on the standard input is used
487: to generate an archive on the standard output whose entries are updated
488: with respect to the files in
489: .IR base .
490: If
491: .I base
492: is
493: .B \-
494: or an empty file then the input files are simply compressed.
495: .B "\-z -"
496: must also be specified to produce a compressed archive for
497: .BR \-rw .
498: .TP
499: .BI B " count"
500: Sets the maximum archive part output character count.
501: .I pax
502: prompts for the next archive part file name.
503: Valid only with
504: .BR \-w .
505: .TP
506: .B C
507: Archive entries smaller than
508: .BI \-B " maxblocks"
509: must be contained within a single part.
510: Valid only with
511: .BR \-B .
512: .TP
513: .B L
514: Copy a logical view of the input files.
515: Symbolic links are followed, causing the pointed to files to be copied
516: rather than the symbolic link information.
517: This is the default.
518: .TP
519: .BI M " message"
520: Set the
521: .I "end of medium"
522: prompt to
523: .IR message .
524: This message is used to prompt interactively for the next tape
525: reel or cartridge in cases where the tape runs out before
526: all files have been copied.
527: .I message
528: may contain one
529: .IR printf (3)
530: style integer format specification that is replaced with the
531: next part number.
532: .TP
533: .B P
534: Copy a physical view of the input files.
535: Causes symbolic link information to be copied as opposed to the
536: default (logical view) action of following symbolic links
537: and copying the pointed to files.
538: .TP
539: \fBR\fP \fIoption\fP[\fIvalue\fP][,\fIoption\fP[\fIvalue\fP]...]
540: Set record oriented format options.
541: Multiple options may be concatenated using
542: .BR , .
543: Some options may be fixed for some formats.
544: The options are:
545: .RS
546: .PD 0
547: .TP
548: .B c
549: Record data is subject to character set conversions.
550: .TP
551: .BI f format
552: Set the output record format to
553: .IR format .
554: The supported record formats are:
555: .RS
556: .TP
557: .B D
558: Variable length with 4 byte record header.
559: The record size default is 512.
560: .TP
561: .B F
562: Fixed length with no record header.
563: The record size default is 128.
564: .TP
565: .B S
566: Spanned variable length with 4 byte record header.
567: The record size default is 0 (no limit).
568: .TP
569: .B U
570: Variable length with no record header.
571: The output block size matches the size of each output record.
572: The record size default is 512.
573: .TP
574: .B V
575: Spanned variable length with binary 4 byte record header.
576: The record size default is 0 (no limit).
577: The
578: .B D
579: format is preferred.
580: .PD
581: .RE
582: .TP
583: .BI m pattern
584: Only those files with input record format matching
585: .I pattern
586: are processed.
587: .TP
588: .B p
589: Partial output blocks are padded to the full blocksize.
590: .TP
591: .BI s size
592: Set the output record size to
593: .IR size .
594: .I size
595: should divide the output blocking.
596: .TP
597: .BI v label
598: Set the output volume label to
599: .IR label .
600: Some formats may truncate and/or case-convert
601: .IR label .
602: .PD
603: .RE
604: .TP
605: .B S
606: Similar to
607: .B \-l
608: except that symbolic links are created.
609: .TP
610: .BI U " id"
611: Set file ownership to the default of the user named
612: .IR id .
613: Valid only for the super-user.
614: .TP
615: .B V
616: Output a `.' as each file is encountered.
617: This overrides the
618: .B \-v
619: option.
620: .TP
621: .B X
622: Do not cross mount points when searching for files to output.
623: .SH DIAGNOSTICS
624: The number of files, blocks, and optionally the number of volumes and
625: media parts are listed on the standard error.
626: For
627: .B \-v
628: the input archive formats are also listed on the standard error.
629: .SH EXAMPLES
630: .TP
631: .B "pax \-w \-t 1m ."
632: Copies the contents of the current directory to tape drive 1, medium density.
633: .TP
634: .PD 0
635: .BI mkdir " newdir"
636: .TP
637: .BI cd " olddir"
638: .TP
639: .BI "pax \-rw ." " newdir"
640: .PD
641: Copies the
642: .I olddir
643: directory hierarchy to
644: .IR newdir .
645: .SH "SEE ALSO"
646: ar(1), cpio(1), find(1), ksh(1), tar(1), tw(1), libdelta(3), cpio(5), tar(5)
647: .SH BUGS
648: Special privileges may be required to copy special files.
649: .br
650: Each archive format has a hard upper limit on member pathname sizes.
651: .br
652: Device, user-id and group-id numbers larger than 65535 cause additional
653: header records to be output.
654: These records are ignored by old versions of
655: .IR cpio (1)
656: and
657: .IR tar (1).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.