1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
|
PAX(1) NetBSD Reference Manual PAX(1)
NNAAMMEE
ppaaxx - read and write file archives and copy directory hierarchies
SSYYNNOOPPSSIISS
ppaaxx [--ccddjjnnvvzzOO] [--EE _l_i_m_i_t] [--ff _a_r_c_h_i_v_e] [--NN _d_b_d_i_r] [--ss _r_e_p_l_s_t_r] _._._.
[--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e]] _._._. [_p_a_t_t_e_r_n
_._._.]
ppaaxx --rr [--ccddiijjkknnuuvvzzAADDOOYYZZ] [--EE _l_i_m_i_t] [--ff _a_r_c_h_i_v_e] [--NN _d_b_d_i_r] [--oo _o_p_t_i_o_n_s]
_._._. [--pp _s_t_r_i_n_g] _._._. [--ss _r_e_p_l_s_t_r] _._._. [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT
[_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e]] _._._. [_p_a_t_t_e_r_n _._._.]
ppaaxx --ww [--ddiijjttuuvvzzAAHHLLMMOOPPXX] [--bb _b_l_o_c_k_s_i_z_e] [[--aa] [--ff _a_r_c_h_i_v_e]] [--xx _f_o_r_m_a_t]
[--BB _b_y_t_e_s] [--NN _d_b_d_i_r] [--oo _o_p_t_i_o_n_s] _._._. [--ss _r_e_p_l_s_t_r] _._._. [--UU _u_s_e_r] _._._.
[--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e][/[cc][mm]]] _._._. [_f_i_l_e _._._.]
ppaaxx --rr --ww [--ddiijjkkllnnttuuvvzzAADDHHLLMMOOPPXXYYZZ] [--NN _d_b_d_i_r] [--pp _s_t_r_i_n_g] _._._. [--ss _r_e_p_l_s_t_r]
_._._. [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e][/[cc][mm]]]
_._._. [_f_i_l_e _._._.] _d_i_r_e_c_t_o_r_y
DDEESSCCRRIIPPTTIIOONN
ppaaxx will read, write, and list the members of an archive file, and will
copy directory hierarchies. If the archive file is of the form:
_[_[_u_s_e_r_@_]_h_o_s_t_:_]_f_i_l_e then the archive will be processed using rmt(8).
ppaaxx operation is independent of the specific archive format, and supports
a wide variety of different archive formats. A list of supported archive
formats can be found under the description of the --xx option.
The presence of the --rr and the --ww options specifies which of the follow-
ing functional modes ppaaxx will operate under: _l_i_s_t, _r_e_a_d, _w_r_i_t_e, and _c_o_p_y.
<none> _L_i_s_t. ppaaxx will write to standard output a table of contents of
the members of the archive file read from standard input, whose
pathnames match the specified _p_a_t_t_e_r_n_s. The table of contents
contains one filename per line and is written using single line
buffering.
--rr _R_e_a_d. ppaaxx extracts the members of the archive file read from the
standard input, with pathnames matching the specified _p_a_t_t_e_r_n_s.
The archive format and blocking is automatically determined on
input. When an extracted file is a directory, the entire file
hierarchy rooted at that directory is extracted. All extracted
files are created relative to the current file hierarchy. The
setting of ownership, access and modification times, and file
mode of the extracted files are discussed in more detail under
the --pp option.
--ww _W_r_i_t_e. ppaaxx writes an archive containing the _f_i_l_e operands to
standard output using the specified archive format. When no _f_i_l_e
operands are specified, a list of files to copy with one per line
is read from standard input. When a _f_i_l_e operand is also a di-
rectory, the entire file hierarchy rooted at that directory will
be included.
--rr --ww _C_o_p_y. ppaaxx copies the _f_i_l_e operands to the destination _d_i_r_e_c_t_o_r_y.
When no _f_i_l_e operands are specified, a list of files to copy with
one per line is read from the standard input. When a _f_i_l_e
operand is also a directory the entire file hierarchy rooted at
that directory will be included. The effect of the _c_o_p_y is as if
the copied files were written to an archive file and then subse-
quently extracted, except that there may be hard links between
the original and the copied files (see the --ll option below).
_W_a_r_n_i_n_g: The destination _d_i_r_e_c_t_o_r_y must not be one of the _f_i_l_e
operands or a member of a file hierarchy rooted at one of the
_f_i_l_e operands. The result of a _c_o_p_y under these conditions is
unpredictable.
While processing a damaged archive during a _r_e_a_d or _l_i_s_t operation, ppaaxx
will attempt to recover from media defects and will search through the
archive to locate and process the largest number of archive members pos-
sible (see the --EE option for more details on error handling).
OOPPEERRAANNDDSS
The _d_i_r_e_c_t_o_r_y operand specifies a destination directory pathname. If the
_d_i_r_e_c_t_o_r_y operand does not exist, or it is not writable by the user, or
it is not of type directory, ppaaxx will exit with a non-zero exit status.
The _p_a_t_t_e_r_n operand is used to select one or more pathnames of archive
members. Archive members are selected using the pattern matching nota-
tion described by fnmatch(3). When the _p_a_t_t_e_r_n operand is not supplied,
all members of the archive will be selected. When a _p_a_t_t_e_r_n matches a
directory, the entire file hierarchy rooted at that directory will be se-
lected. When a _p_a_t_t_e_r_n operand does not select at least one archive mem-
ber, ppaaxx will write these _p_a_t_t_e_r_n operands in a diagnostic message to
standard error and then exit with a non-zero exit status.
The _f_i_l_e operand specifies the pathname of a file to be copied or
archived. When a _f_i_l_e operand does not select at least one archive mem-
ber, ppaaxx will write these _f_i_l_e operand pathnames in a diagnostic message
to standard error and then exit with a non-zero exit status.
OOPPTTIIOONNSS
The following options are supported:
--rr Read an archive file from standard input and extract the specified
_f_i_l_e_s. If any intermediate directories are needed in order to ex-
tract an archive member, these directories will be created as if
mkdir(2) was called with the bitwise inclusive OR of S_IRWXU,
S_IRWXG, and S_IRWXO as the mode argument. When the selected
archive format supports the specification of linked files and these
files cannot be linked while the archive is being extracted, ppaaxx
will write a diagnostic message to standard error and exit with a
non-zero exit status at the completion of operation.
--ww Write files to the standard output in the specified archive format.
When no _f_i_l_e operands are specified, standard input is read for a
list of pathnames with one per line without any leading or trailing
<blanks>.
--aa Append _f_i_l_e_s to the end of an archive that was previously written.
If an archive format is not specified with a --xx option, the format
currently being used in the archive will be selected. Any attempt
to append to an archive in a format different from the format al-
ready used in the archive will cause ppaaxx to exit immediately with a
non-zero exit status. The blocking size used in the archive volume
where writing starts will continue to be used for the remainder of
that archive volume.
_W_a_r_n_i_n_g: Many storage devices are not able to support the opera-
tions necessary to perform an append operation. Any attempt to ap-
pend to an archive stored on such a device may damage the archive
or have other unpredictable results. Tape drives in particular are
more likely to not support an append operation. An archive stored
in a regular file system file or on a disk device will usually sup-
port an append operation.
--bb _b_l_o_c_k_s_i_z_e
When _w_r_i_t_i_n_g an archive, block the output at a positive decimal in-
teger number of bytes per write to the archive file. The _b_l_o_c_k_s_i_z_e
must be a multiple of 512 bytes with a maximum of 32256 bytes. A
_b_l_o_c_k_s_i_z_e can end with k or b to specify multiplication by 1024
(1K) or 512, respectively. A pair of _b_l_o_c_k_s_i_z_e_s can be separated
by x to indicate a product. A specific archive device may impose
additional restrictions on the size of blocking it will support.
When blocking is not specified, the default _b_l_o_c_k_s_i_z_e is dependent
on the specific archive format being used (see the --xx option).
--cc Match all file or archive members _e_x_c_e_p_t those specified by the
_p_a_t_t_e_r_n and _f_i_l_e operands.
--dd Cause files of type directory being copied or archived, or archive
members of type directory being extracted, to match only the direc-
tory file or archive member and not the file hierarchy rooted at
the directory.
--ff _a_r_c_h_i_v_e
Specify _a_r_c_h_i_v_e as the pathname of the input or output archive,
overriding the default standard input (for _l_i_s_t and _r_e_a_d) or
standard output (for _w_r_i_t_e). A single archive may span multiple
files and different archive devices. When required, ppaaxx will
prompt for the pathname of the file or device of the next volume in
the archive.
--ii Interactively rename files or archive members. For each archive
member matching a _p_a_t_t_e_r_n operand or each file matching a _f_i_l_e
operand, ppaaxx will prompt to _/_d_e_v_/_t_t_y giving the name of the file,
its file mode and its modification time. ppaaxx will then read a line
from _/_d_e_v_/_t_t_y. If this line is blank, the file or archive member
is skipped. If this line consists of a single period, the file or
archive member is processed with no modification to its name. Oth-
erwise, its name is replaced with the contents of the line. ppaaxx
will immediately exit with a non-zero exit status if <EOF> is en-
countered when reading a response or if _/_d_e_v_/_t_t_y cannot be opened
for reading and writing.
--jj Use bzip2(1) for compression when reading or writing archive files.
--kk Do not overwrite existing files.
--ll Link files. (The letter ell). In the _c_o_p_y mode (--rr --ww), hard
links are made between the source and destination file hierarchies
whenever possible.
--nn Select the first archive member that matches each _p_a_t_t_e_r_n operand.
No more than one archive member is matched for each _p_a_t_t_e_r_n. When
members of type directory are matched, the file hierarchy rooted at
that directory is also matched (unless --dd is also specified).
--oo _o_p_t_i_o_n_s
Information to modify the algorithm for extracting or writing
archive files which is specific to the archive format specified by
--xx. In general, _o_p_t_i_o_n_s take the form: nnaammee==vvaalluuee
--pp _s_t_r_i_n_g
Specify one or more file characteristic options (privileges). The
_s_t_r_i_n_g option-argument is a string specifying file characteristics
to be retained or discarded on extraction. The string consists of
the specification characters aa, ee, ff, mm, oo, and pp. Multiple char-
acteristics can be concatenated within the same string and multiple
--pp options can be specified. The meaning of the specification
characters are as follows:
aa Do not preserve file access times. By default, file access
times are preserved whenever possible.
ee `Preserve everything', the user ID, group ID, file mode bits,
file access time, and file modification time. This is intended
to be used by _r_o_o_t, someone with all the appropriate privi-
leges, in order to preserve all aspects of the files as they
are recorded in the archive. The ee flag is the sum of the oo
and pp flags.
mm Do not preserve file modification times. By default, file mod-
ification times are preserved whenever possible.
oo Preserve the user ID and group ID.
pp `Preserve' the file mode bits. This is intended to be used by
a _u_s_e_r with regular privileges who wants to preserve all as-
pects of the file other than the ownership. The file times are
preserved by default, but two other flags are offered to dis-
able this and use the time of extraction instead.
In the preceding list, `preserve' indicates that an attribute
stored in the archive is given to the extracted file, subject to
the permissions of the invoking process. Otherwise the attribute
of the extracted file is determined as part of the normal file cre-
ation action. If neither the ee nor the oo specification character
is specified, or the user ID and group ID are not preserved for any
reason, ppaaxx will not set the S_ISUID (_s_e_t_u_i_d) and S_ISGID (_s_e_t_g_i_d)
bits of the file mode. If the preservation of any of these items
fails for any reason, ppaaxx will write a diagnostic message to
standard error. Failure to preserve these items will affect the
final exit status, but will not cause the extracted file to be
deleted. If the file characteristic letters in any of the string
option-arguments are duplicated or conflict with each other, the
one(s) given last will take precedence. For example, if
--pp _e_m_e
is specified, file modification times are still preserved.
--ss _r_e_p_l_s_t_r
Modify the file or archive member names specified by the _p_a_t_t_e_r_n or
_f_i_l_e operands according to the substitution expression _r_e_p_l_s_t_r, us-
ing the syntax of the ed(1) utility regular expressions. The for-
mat of these regular expressions are:
/old/new/[gp]
As in ed(1), oolldd is a basic regular expression and nneeww can contain
an ampersand (&), \n (where n is a digit) back-references, or
subexpression matching. The oolldd string may also contain <newline>
characters. Any non-null character can be used as a delimiter (/
is shown here). Multiple --ss expressions can be specified. The ex-
pressions are applied in the order they are specified on the com-
mand line, terminating with the first successful substitution. The
optional trailing gg continues to apply the substitution expression
to the pathname substring which starts with the first character
following the end of the last successful substitution. The first
unsuccessful substitution stops the operation of the gg option. The
optional trailing pp will cause the final result of a successful
substitution to be written to standard error in the following for-
mat:
<original pathname> >> <new pathname>
File or archive member names that substitute to the empty string
are not selected and will be skipped.
--tt Reset the access times of any file or directory read or accessed by
ppaaxx to be the same as they were before being read or accessed by
ppaaxx, if the user has the appropriate permissions required by
utime(3).
--uu Ignore files that are older (having a less recent file modification
time) than a pre-existing file or archive member with the same
name. During _r_e_a_d, an archive member with the same name as a file
in the file system will be extracted if the archive member is newer
than the file. During _w_r_i_t_e, a file system member with the same
name as an archive member will be written to the archive if it is
newer than the archive member. During _c_o_p_y, the file in the desti-
nation hierarchy is replaced by the file in the source hierarchy or
by a link to the file in the source hierarchy if the file in the
source hierarchy is newer.
--vv During a _l_i_s_t operation, produce a verbose table of contents using
the format of the ls(1) utility with the --ll option. For pathnames
representing a hard link to a previous member of the archive, the
output has the format:
<ls -l listing> == <link name>
Where <ls -l listing> is the output format specified by the ls(1)
utility when used with the --ll option. Otherwise for all the other
operational modes (_r_e_a_d, _w_r_i_t_e, and _c_o_p_y), pathnames are written
and flushed to standard error without a trailing <newline> as soon
as processing begins on that file or archive member. The trailing
<newline>, is not buffered, and is written only after the file has
been read or written.
--xx _f_o_r_m_a_t
Specify the output archive format, with the default format being
_u_s_t_a_r. ppaaxx currently supports the following formats:
_c_p_i_o The extended cpio interchange format specified in the IEEE
Std 1003.2 (``POSIX.2'') standard. The default blocksize
for this format is 5120 bytes. Inode and device informa-
tion about a file (used for detecting file hard links by
this format) which may be truncated by this format is de-
tected by ppaaxx and is repaired.
_b_c_p_i_o The old binary cpio format. The default blocksize for
this format is 5120 bytes. This format is not very
portable and should not be used when other formats are
available. Inode and device information about a file
(used for detecting file hard links by this format) which
may be truncated by this format is detected by ppaaxx and is
repaired.
_s_v_4_c_p_i_o The AT&T System V.4 UNIX cpio. The default blocksize for
this format is 5120 bytes. Inode and device information
about a file (used for detecting file hard links by this
format) which may be truncated by this format is detected
by ppaaxx and is repaired.
_s_v_4_c_r_c The AT&T System V.4 UNIX cpio with file crc checksums.
The default blocksize for this format is 5120 bytes. In-
ode and device information about a file (used for detect-
ing file hard links by this format) which may be truncated
by this format is detected by ppaaxx and is repaired.
_t_a_r The old BSD tar format as found in 4.3BSD. The default
blocksize for this format is 10240 bytes. Pathnames
stored by this format must be 100 characters or less in
length. Only _r_e_g_u_l_a_r files, _h_a_r_d _l_i_n_k_s, _s_o_f_t _l_i_n_k_s, and
_d_i_r_e_c_t_o_r_i_e_s will be archived (other file system types are
not supported). For backwards compatibility with even
older tar formats, a --oo option can be used when writing an
archive to omit the storage of directories. This option
takes the form:
--oo wwrriittee__oopptt==nnooddiirr
_u_s_t_a_r The extended tar interchange format specified in the IEEE
Std 1003.2 (``POSIX.2'') standard. The default blocksize
for this format is 10240 bytes. Pathnames stored by this
format must be 250 characters or less in length.
ppaaxx will detect and report any file that it is unable to store or
extract as the result of any specific archive format restrictions.
The individual archive formats may impose additional restrictions
on use. Typical archive format restrictions include (but are not
limited to): file pathname length, file size, link pathname length
and the type of the file.
--zz Use gzip(1) compression, when reading or writing archive files.
--AA Do not strip leading `/'s from file names.
--BB _b_y_t_e_s
Limit the number of bytes written to a single archive volume to
_b_y_t_e_s. The _b_y_t_e_s limit can end with m, k, or b to specify multi-
plication by 1048576 (1M), 1024 (1K) or 512, respectively. A pair
of _b_y_t_e_s limits can be separated by x to indicate a product.
_W_a_r_n_i_n_g: Only use this option when writing an archive to a device
which supports an end of file read condition based on last (or
largest) write offset (such as a regular file or a tape drive).
The use of this option with a floppy or hard disk is not recommend-
ed.
--DD This option is the same as the --uu option, except that the file in-
ode change time is checked instead of the file modification time.
The file inode change time can be used to select files whose inode
information (e.g. uid, gid, etc.) is newer than a copy of the file
in the destination _d_i_r_e_c_t_o_r_y.
--EE _l_i_m_i_t
Limit the number of consecutive read faults while trying to read a
flawed archives to _l_i_m_i_t. With a positive _l_i_m_i_t, ppaaxx will attempt
to recover from an archive read error and will continue processing
starting with the next file stored in the archive. A _l_i_m_i_t of 0
will cause ppaaxx to stop operation after the first read error is de-
tected on an archive volume. A _l_i_m_i_t of NONE will cause ppaaxx to at-
tempt to recover from read errors forever. The default _l_i_m_i_t is a
small positive number of retries.
_W_a_r_n_i_n_g: Using this option with NONE should be used with extreme
caution as ppaaxx may get stuck in an infinite loop on a very badly
flawed archive.
--GG _g_r_o_u_p
Select a file based on its _g_r_o_u_p name, or when starting with a ##, a
numeric gid. A '\' can be used to escape the ##. Multiple --GG op-
tions may be supplied and checking stops with the first match.
--HH Follow only command line symbolic links while performing a physical
file system traversal.
--LL Follow all symbolic links to perform a logical file system traver-
sal.
--MM During a _w_r_i_t_e or _c_o_p_y operation, treat the list of files on
standard input as an mtree(8) `specfile' specification, and write
or copy only those items in the specfile.
If the file exists in the underlying file system, its permissions
and modification time will be used unless specifically overridden
by the specfile. An error will be raised if the type of entry in
the specfile conflicts with that of an existing file. A directory
entry that is marked `ooppttiioonnaall' will not be copied (even though its
contents will be).
Otherwise, the entry will be `faked-up', and it is necessary to
specify at least the following parameters in the specfile: ttyyppee,
mmooddee, ggnnaammee or ggiidd, and uunnaammee or uuiidd, ddeevviiccee (in the case of block
or character devices), and lliinnkk (in the case of symbolic links).
If ttiimmee isn't provided, the current time will be used. A `faked-
up' entry that is marked `ooppttiioonnaall' will not be copied.
--NN _d_b_d_i_r
Except for lookups for the --GG and --UU options, use the user database
text file _m_a_s_t_e_r_._p_a_s_s_w_d and group database text file _g_r_o_u_p from
_d_b_d_i_r, rather than using the results from the system's getpwnam(3)
and getgrnam(3) (and related) library calls.
--OO Force the archive to be one volume. If a volume ends prematurely,
ppaaxx will not prompt for a new volume. This option can be useful
for automated tasks where error recovery cannot be performed by a
human.
--PP Do not follow symbolic links, perform a physical file system
traversal. This is the default mode.
--TT _[_f_r_o_m___d_a_t_e_]_[_,_t_o___d_a_t_e_]_[_/_[_c_]_[_m_]_]
Allow files to be selected based on a file modification or inode
change time falling within a specified time range of _f_r_o_m___d_a_t_e to
_t_o___d_a_t_e (the dates are inclusive). If only a _f_r_o_m___d_a_t_e is sup-
plied, all files with a modification or inode change time equal to
or younger are selected. If only a _t_o___d_a_t_e is supplied, all files
with a modification or inode change time equal to or older will be
selected. When the _f_r_o_m___d_a_t_e is equal to the _t_o___d_a_t_e, only files
with a modification or inode change time of exactly that time will
be selected.
When ppaaxx is in the _w_r_i_t_e or _c_o_p_y mode, the optional trailing field
_[_c_]_[_m_] can be used to determine which file time (inode change, file
modification or both) are used in the comparison. If neither is
specified, the default is to use file modification time only. The
_m specifies the comparison of file modification time (the time when
the file was last written). The _c specifies the comparison of in-
ode change time (the time when the file inode was last changed;
e.g. a change of owner, group, mode, etc). When _c and _m are both
specified, then the modification and inode change times are both
compared. The inode change time comparison is useful in selecting
files whose attributes were recently changed or selecting files
which were recently created and had their modification time reset
to an older time (as what happens when a file is extracted from an
archive and the modification time is preserved). Time comparisons
using both file times is useful when ppaaxx is used to create a time
based incremental archive (only files that were changed during a
specified time range will be archived).
A time range is made up of six different fields and each field must
contain two digits. The format is:
[[[[[cc]yy]mm]dd]hh]mm[.ss]
Where cccc is the first two digits of the year (the century), yyyy is
the last two digits of the year, the first mmmm is the month (from 01
to 12), dddd is the day of the month (from 01 to 31), hhhh is the hour
of the day (from 00 to 23), the second mmmm is the minute (from 00 to
59), and ssss is the seconds (from 00 to 61). Only the minute field
mmmm is required; the others will default to the current system val-
ues. The ssss field may be added independently of the other fields.
If the century is not specified, it defaults to 1900 for years be-
tween 69 and 99, or 2000 for years between 0 and 68. Time ranges
are relative to the current time, so
--TT _1_2_3_4_/_c_m
would select all files with a modification or inode change time of
12:34 PM today or later. Multiple --TT time range can be supplied
and checking stops with the first match.
--UU _u_s_e_r
Select a file based on its _u_s_e_r name, or when starting with a ##, a
numeric uid. A '\' can be used to escape the ##. Multiple --UU op-
tions may be supplied and checking stops with the first match.
--XX When traversing the file hierarchy specified by a pathname, do not
descend into directories that have a different device ID. See the
st_dev field as described in stat(2) for more information about de-
vice ID's.
--YY This option is the same as the --DD option, except that the inode
change time is checked using the pathname created after all the
file name modifications have completed.
--ZZ This option is the same as the --uu option, except that the modifica-
tion time is checked using the pathname created after all the file
name modifications have completed.
----ffoorrccee--llooccaall
Do not interpret filenames that contain a `:' as remote files.
----iinnsseeccuurree
Normally ppaaxx ignores filenames that contain `..' as a path compo-
nent. With this option, files that contain `..' can be processed.
The options that operate on the names of files or archive members (--cc,
--ii, --nn, --ss, --uu, --vv, --DD, --GG, --TT, --UU, --YY, and --ZZ) interact as follows.
When extracting files during a _r_e_a_d operation, archive members are
`selected', based only on the user specified pattern operands as modified
by the --cc, --nn, --uu, --DD, --GG, --TT, --UU options. Then any --ss and --ii options
will modify in that order, the names of these selected files. Then the
--YY and --ZZ options will be applied based on the final pathname. Finally
the --vv option will write the names resulting from these modifications.
When archiving files during a _w_r_i_t_e operation, or copying files during a
_c_o_p_y operation, archive members are `selected', based only on the user
specified pathnames as modified by the --nn, --uu, --DD, --GG, --TT, and --UU options
(the --DD option only applies during a copy operation). Then any --ss and --ii
options will modify in that order, the names of these selected files.
Then during a _c_o_p_y operation the --YY and the --ZZ options will be applied
based on the final pathname. Finally the --vv option will write the names
resulting from these modifications.
When one or both of the --uu or --DD options are specified along with the --nn
option, a file is not considered selected unless it is newer than the
file to which it is compared.
EEXXAAMMPPLLEESS
The command:
pax -w -f /dev/rst0 .
copies the contents of the current directory to the device _/_d_e_v_/_r_s_t_0.
The command:
pax -v -f filename
gives the verbose table of contents for an archive stored in _f_i_l_e_n_a_m_e.
The following commands:
mkdir newdir
cd olddir
pax -rw -pp . ../newdir
will copy the entire _o_l_d_d_i_r directory hierarchy to _n_e_w_d_i_r, preserving
permissions and access times.
When running as root, one may also wish to preserve file ownership when
copying directory trees. This can be done with the following commands:
cd olddir
pax -rw -pe . .../newdir
which will copy the contents of _o_l_d_d_i_r into _._._._/_n_e_w_d_i_r, preserving owner-
ship, permissions and access times.
The command:
pax -r -s ',^//*usr//*,,' -f a.pax
reads the archive _a_._p_a_x, with all files rooted in ``/usr'' into the
archive extracted relative to the current directory.
The command:
pax -rw -i . dest_dir
can be used to interactively select the files to copy from the current
directory to _d_e_s_t___d_i_r.
The command:
pax -r -pe -U root -G bin -f a.pax
will extract all files from the archive _a_._p_a_x which are owned by _r_o_o_t
with group _b_i_n and will preserve all file permissions.
The command:
pax -r -w -v -Y -Z home /backup
will update (and list) only those files in the destination directory
_/_b_a_c_k_u_p which are older (less recent inode change or file modification
times) than files with the same name found in the source file tree _h_o_m_e.
EERRRROORRSS
ppaaxx will exit with one of the following values:
0 All files were processed successfully.
1 An error occurred.
Whenever ppaaxx cannot create a file or a link when reading an archive or
cannot find a file when writing an archive, or cannot preserve the user
ID, group ID, or file mode when the --pp option is specified, a diagnostic
message is written to standard error and a non-zero exit status will be
returned, but processing will continue. In the case where pax cannot
create a link to a file, ppaaxx will not create a second copy of the file.
If the extraction of a file from an archive is prematurely terminated by
a signal or error, ppaaxx may have only partially extracted a file the user
wanted. Additionally, the file modes of extracted files and directories
may have incorrect file bits, and the modification and access times may
be wrong.
If the creation of an archive is prematurely terminated by a signal or
error, ppaaxx may have only partially created the archive which may violate
the specific archive format specification.
If while doing a _c_o_p_y, ppaaxx detects a file is about to overwrite itself,
the file is not copied, a diagnostic message is written to standard error
and when ppaaxx completes it will exit with a non-zero exit status.
SSEEEE AALLSSOO
cpio(1), tar(1), symlink(7), mtree(8)
SSTTAANNDDAARRDDSS
The ppaaxx utility is a superset of the IEEE Std 1003.2 (``POSIX.2'') stan-
dard. The options --BB, --DD, --EE, --GG, --HH, --LL, --MM, --OO, --PP, --TT, --UU, --YY, --ZZ,
--zz, the archive formats _b_c_p_i_o, _s_v_4_c_p_i_o, _s_v_4_c_r_c, _t_a_r, and the flawed
archive handling during _l_i_s_t and _r_e_a_d operations are extensions to the
POSIX standard.
AAUUTTHHOORRSS
Keith Muller at the University of California, San Diego. Luke Mewburn
implemented --MM.
NetBSD 1.6.1_STABLE March 31, 2003 10
|