summaryrefslogtreecommitdiff
path: root/package/heirloom-cpio/src/pax.1
blob: 4fb9206f98fd5419c84e4c78baf8211760fa23a4 (plain)
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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
'\" t
.\" Copyright (c) 2004 Gunnar Ritter
.\"
.\" This software is provided 'as-is', without any express or implied
.\" warranty. In no event will the authors be held liable for any damages
.\" arising from the use of this software.
.\"
.\" Permission is granted to anyone to use this software for any purpose,
.\" including commercial applications, and to alter it and redistribute
.\" it freely, subject to the following restrictions:
.\"
.\" 1. The origin of this software must not be misrepresented; you must not
.\"    claim that you wrote the original software. If you use this software
.\"    in a product, an acknowledgment in the product documentation would be
.\"    appreciated but is not required.
.\"
.\" 2. Altered source versions must be plainly marked as such, and must not be
.\"    misrepresented as being the original software.
.\"
.\" 3. This notice may not be removed or altered from any source distribution.
.\" Sccsid @(#)pax.1	1.38 (gritter) 8/13/09
.TH PAX 1 "8/13/09" "Heirloom Toolchest" "User Commands"
.SH NAME
pax \- portable archive interchange
.SH SYNOPSIS
.PD 0
.HP
.nh
.ad l
\fBpax\fR [\fB\-cdnvK\fR] [\fB\-b\ \fIsize\fR]
[\fB\-f\ \fIfile\fR] [\fB\-s\ \fIreplstr\fR]
[\fB\-x\ \fIhdr\fR] [\fIpatterns\fR]
.HP
.ad l
\fBpax\fR \fB\-r\fR[\fBcdiknuvK\fR] [\fB\-b\ \fIsize\fR]
[\fB\-f\ \fIfile\fR]
[\fB\-o\ \fIoptions\fR]
[\fB\-p\ \fIpriv\fR] [\fB\-s\ \fIreplstr\fR]
[\fB\-x\ \fIhdr\fR] [\fIpatterns\fR]
.HP
.ad l
\fBpax\fR \fB\-w\fR[\fBadiHtuvLX\fR] [\fB\-b\ \fIsize\fR]
[\fB\-f\ \fIfile\fR]
[\fB\-o\ \fIoptions\fR]
[\fB\-s\ \fIreplstr\fR]
[\fB\-x\ \fIhdr\fR] [\fIfiles\fR]
.HP
.ad l
\fBpax\fR \fB\-rw\fR[\fBdiHklntuvLX\fR]
[\fB\-p\ \fIpriv\fR] [\fB\-s\ \fIreplstr\fR]
[\fIfiles\fR] \fIdirectory\fR
.br
.ad b
.hy 1
.PD
.SH DESCRIPTION
.I Pax
creates and extracts file archives and copies files.
.PP
If neither the
.I \-r
or
.I \-w
options are given,
.I pax
works in
.I list
mode
and prints the contents of the archive.
.PP
With the
.B \-r
option,
.I pax
works in
.RI ` read '
mode and extracts files from a file archive.
By default,
the archive is read from standard input.
Optional arguments are interpreted as
.I patterns
and restrict the set of extracted files
to those matching any of the
.IR patterns .
The syntax is identical to that described in
.IR glob (7),
except that the slash character
.RB ` / '
is matched by
meta-character constructs with
.RB ` * ',
.RB ` ? '
and
.RB ` [ '.
Care must be taken to quote meta-characters appropriately from the shell.
If a pattern matches the prefix name of a directory in the archive,
all files below that directory are also extracted.
File permissions are set to those in the archive;
if the caller is the super-user,
ownerships are restored as well.
options are specified.
Archives compressed with
.IR bzip2 (1),
.IR compress (1),
.IR gzip (1),
or
.IR rpm (1)
are transparently de\%compressed on input.
.PP
With
.BR \-w ,
.I pax
works in
.RI ` write '
mode,
creates archives
and writes them to standard output per default.
A list of filenames to be included in the archive is
read from standard input;
if the name of a directory appears,
all its members and the directory itself are recursively
included in the archive.
The
.IR find (1)
utility is useful to generate a list of files
(see also its
.I \-cpio
and
.I \-ncpio
operators).
When producing a filename list for
.IR pax ,
find should always be invoked with
.I \-depth
since this makes it possible to extract write-protected directories
for users other than the super-user.
If
.I files
are given on the command line,
they are included in the archive
in the same manner as described above
and standard input is not read.
.PP
The
.B \-rw
options selects
.RI ` copy '
mode;
a list of
.I files
is read from standard input
or taken from the command line
as described for
.IR \-w ;
files are copied to the specified
.IR directory ,
preserving attributes as described for
.IR \-r .
Special files are re-created in the target hierarchy,
and hard links between copied files are preserved.
.PP
When a premature end-of-file is detected with
.I \-r
and
.I \-w
and the archive is a block or character special file,
the user is prompted for new media.
.PP
The following options alter the behavior of
.IR pax :
.TP
.B \-a
Append files to the archive.
The archive must be seekable,
such as a regular file or a block device,
or a tape device capable of writing between filemarks.
.TP
\fB\-b\fI size\fR[\fBw\fR|\fBb\fR|\fBk\fR|\fBm\fR]
Blocks input and output archives at
.I size
byte records.
The optional suffix multiplies
.I size
by 2 for
.BR w ,
512 for
.BR b ,
1024 for
.BR k ,
and 1048576 for
.BR m .
.TP
.B \-c
Reverses the sense of patterns
such that a file that does not match any of the patterns
is selected.
.TP
.B \-d
Causes
.I pax
to ignore files below directories.
In read mode,
patterns matching directories
cause only the directory itself to extracted,
files below will be ignored
unless another pattern applies to them.
In write mode,
arguments or standard input lines referring to directories
do not cause files below the respective directory
to be archived.
.TP
\fB\-f\fI\ file\fR
Selects a
.I file
that is read with the
.I \-r
option instead of standard input
or written with the
.I \-w
option instead of standard output.
.TP
.B \-H
Follow symbolic links given on the command line when reading files with
.I \-w
or
.IR \-rw ,
but do not follow symbolic links encountered during directory traversal.
.TP
.B \-i
Rename files interactively.
Before a file is extracted from the archive,
its file name is printed on standard error
and the user is prompted to specify a substitute file name.
If the line read from the terminal is empty,
the file is skipped;
if the line consists of a single dot,
the name is retained;
otherwise,
the line forms the new file name.
.TP
.B \-k
Causes existing files not to be overwritten.
.TP
.B \-K
Try to continue operation on read errors and invalid headers.
If an archive contains another archive,
files from either archive may be chosen.
.TP
.B \-l
Link files instead of copying them with
.I \-rw
if possible.
.TP
.B \-L
Follow symbolic links when reading files with
.I \-w
or
.IR \-rw .
.B /usr/posix2001/bin/pax
terminates immediately when it
detects a symbolic link loop with this option.
.TP
.B \-n
If any
.I pattern
arguments are present,
each pattern can match exactly one archive member;
further members that could match the particular pattern are ignored.
Without
.I pattern
arguments,
only the first occurence of
a file that occurs more than once in the archive
is selected, the following are ignored.
.TP
\fB\-o\ \fIoption\fB,\fR[\fIoption\fB,\fR\|...]
Specifies options as described for \fI\-x pax\fR.
.TP
\fB\-p\ \fIstring\fR
Specifies which file modes are to be preserved or ignored.
.I string
may contain one or more of
.RS
.TP
.B a
Inhibits preservation of file access times.
.TP
.B e
Causes preservation of every possible mode, ownership and time.
.TP
.B m
Inhibits preservation of file modification times.
.TP
.B o
Causes preservation of owner and group IDs.
.TP
.B p
Causes preservation of file mode bits
regardless of the umask
(see
.IR umask (2)).
.RE
.IP
If file ownership is preserved,
.I pax
tries to set the group ownerships to those specified in the archive
or the original hierarchy, respectively,
regardless of the privilegues of the invoking user.
.BR /usr/5bin/pax ,
.BR /usr/5bin/s42/pax ,
and
.B /usr/5bin/posix/pax
try to set the user ownerships only if invoked by the super-user;
if invoked by regular users,
.B /usr/5bin/posix2001/pax
will produce an error for any file that is not owned by the invoking user.
.TP
\fB\-s\ /\fIregular expression\fB/\fIreplacement\fB/\fR[\fBgp\fR]
Modifies file names in a manner similar to that described in
.IR ed (1).
The
.I p
flag causes each modified file name to printed.
Any character can be used as delimiter instead of
.RI ` / '.
If a file name is empty after the replacement is done,
the file is ignored.
This option can be specified multiple times
to execute multiple substitutions in the order specified.
.TP
.B \-t
Resets the access times of files
that were included in the archive with
.IR \-r .
.TP
.B \-u
In read mode,
.I pax
will not overwrite existing target files
that were modified more recently than the file in the archive
when this option is given.
In write mode,
.I pax
will read the archive first.
It will then only append those files to the archive
that are not already included
or were more recently modified.
.TP
.B \-v
Prints the file names of archived or extracted files with
.I \-r
and
.I \-w
and a verbose output format
if neither of them is given.
.TP
\fB\-x\fI header\fR
Specifies the archive header format to be one of:
.sp
.in +6
.TS
lfB l.
\fBnewc\fR	SVR4 ASCII cpio format;\ 
\fBcrc\fR	SVR4 ASCII cpio format with checksum;\ 
\fBsco\fR	T{
SCO UnixWare 7.1 ASCII cpio format;
T}
\fBscocrc\fR	T{
SCO UnixWare 7.1 ASCII cpio format with checksum;
T}
\fBodc\fR	T{
traditional ASCII cpio format, as standardized in IEEE Std. 1003.1, 1996;
T}
\fBcpio\fR	T{
same as \fIodc\fR;
T}
\fBbin\fR	binary cpio format;
\fBbbs\fR	byte-swapped binary cpio format;
\fBsgi\fR	T{
SGI IRIX extended binary cpio format;
T}
\fBcray\fR	T{
Cray UNICOS 9 cpio format;
T}
\fBcray5\fR	T{
Cray UNICOS 5 cpio format;
T}
\fBdec\fR	T{
Digital UNIX extended cpio format;
T}
\fBtar\fR	tar format;
\fBotar\fR	old tar format;
\fBustar\fR	T{
IEEE Std. 1003.1, 1996 tar format;
T}
.T&
l s.
\fBpax\fR[\fB:\fIoption\fB,\fR[\fIoption\fB,\fR\|...]]
.T&
l l.
\&	T{
IEEE Std. 1003.1, 2001 pax format.
Format-specific \fIoptions\fR are:
.in +2n
.ti 0
.br
\fBlinkdata\fR
.br
For a regular file which has multiple hard links,
the file data is stored once for each link in the archive,
instead of being stored for the first entry only.
This option must be used with care
since many implementations are unable
to read the resulting archive.
.ti 0
.br                                                                            
\fBtimes\fR
.br
Causes the times of last access and last modification
of each archived file
to be stored in an extended \fIpax\fR header.
This in particular allows the time of last access
to be restored when the archive is read.
.br
.in -2n
T}
\fBsun\fR	T{
Sun Solaris 7 extended tar format;
T}
\fBbar\fR	T{
SunOS 4 bar format;
T}
\fBgnu\fR	T{
GNU tar format;
T}
\fBzip\fR[\fB:\fIcc\fR]	T{
zip format with optional compression method.
If \fIcc\fR is one of
\fBen\fR (normal, default),
\fBex\fR (extra),
\fBef\fR (fast),
or
\fBes\fR (super fast),
the standard \fIdeflate\fR compression is used.
\fBe0\fR selects no compression,
and
\fBbz2\fR selects \fIbzip2\fR compression.
T}
.TE
.in -6
.sp
This option is ignored with
.I \-r
unless the
.I \-K
option is also present.
The default for
.I \-w
is traditional ASCII cpio
.I (odc)
format.
.PP
.ne 38
Characteristics of archive formats are as follows:
.sp
.TS
allbox;
l r r r l
l1fB r2 n2 r2 c.
	T{
.ad l
maximum user/\%group id
T}	T{
.ad l
maximum file size
T}	T{
.ad l
maximum pathname length
T}	T{
.ad l
bits in dev_t (major/minor)
T}
\-x\ bin	65535	2 GB\ 	256	\ 16
\-x\ sgi	65535	9 EB\ 	256	\ 14/18
T{
\-x\ odc
T}	262143	8 GB\ 	256	\ 18
\-x\ dec	262143	8 GB\ 	256	\ 24/24
T{
\-x\ newc,
\-x\ crc
T}	4.3e9	4 GB\ 	1024	\ 32/32
T{
\-x\ sco, \-x\ scocrc
T}	4.3e9	9 EB\ 	1024	\ 32/32
T{
\-x\ cray, \-x\ cray5
T}	1.8e19	9 EB\ 	65535	\ 64
\-x\ otar	2097151	8 GB\ 	99	\ n/a
T{
\-x\ tar,
\-x\ ustar
T}	2097151	8 GB\ 	256 (99)	\ 21/21
\-x\ pax	1.8e19	9 EB\ 	65535	\ 21/21
\-x\ sun	1.8e19	9 EB\ 	65535	\ 63/63
\-x\ gnu	1.8e19	9 EB\ 	65535	\ 63/63
\-x\ bar	2097151	8 GB\ 	427	\ 21
\-x\ zip	4.3e9	9 EB\ 	60000	\ 32
.TE
.sp
.PP
The byte order of
.B binary
cpio archives
depends on the machine
on which the archive is created.
Unlike some other implementations,
.I pax
fully supports
archives of either byte order.
.I \-x\ bbs
can be used to create an archive
with the byte order opposed to that of the current machine.
.PP
The
.B sgi
format extends the binary format
to handle larger files and more device bits.
If an archive does not contain any entries
that actually need the extensions,
it is identical to a binary archive.
.I \-x\ sgi
archives are always created in MSB order.
.PP
The
.B odc
format was introduced with System\ III
and standardized with IEEE Std. 1003.1.
All known
.I cpio
and
.I pax
implementations since around 1980 can read this format.
.PP
The
.B dec
format extends the
.I odc
format
to support more device bits.
Archives in this format are generally incompatible with
.I odc
archives
and need special implementation support to be read.
.PP
The
.B \-x\ newc
format was introduced with System\ V Release\ 4.
Except for the file size,
it imposes no practical limitations
on files archived.
The original SVR4 implementation
stores the contents of hard linked files
only once and with the last archived link.
This
.I pax
ensures compatibility with SVR4.
With archives created by implementations that employ other methods
for storing hard linked files,
each file is extracted as a single link,
and some of these files may be empty.
Implementations that expect methods other than the original SVR4 one
may extract no data for hard linked files at all.
.PP
The
.B crc
format is essentially the same as the
.I \-x\ newc
format
but adds a simple checksum (not a CRC, despite its name)
for the data of regular files.
The checksum requires the implementation to read each file twice,
which can considerably increase running time and system overhead.
As not all implementations claiming to support this format
handle the checksum correctly,
it is of limited use.
.PP
The
.B sco
and
.B scocrc
formats are variants of the
.I \-x\ newc
and
.I \-x\ crc
formats, respectively,
with extensions to support larger files.
The extensions result in a different archive format
only if files larger than slightly below 2\ GB occur.
.PP
The
.B cray
format extends all header fields to 64 bits.
It thus imposes no practical limitations of any kind
on archived files,
but requires special implementation support
to be read.
Although it is originally a binary format,
the byte order is always MSB as on Cray machines.
The
.B cray5
format is an older variant
that was used with UNICOS 5 and earlier.
.PP
The
.B otar
format was introduced with the Unix 7th Edition
.I tar
utility.
Archives in this format
can be read on all Unix systems since about 1980.
It can only hold regular files
(and, on more recent systems, symbolic links).
For file names that contain characters with the most significant bit set
(non-ASCII characters),
implementations differ in the interpretation of the header checksum.
.PP
The
.B ustar
format was introduced with IEEE Std. 1003.1.
It extends the old
.I tar
format
with support for directories, device files,
and longer file names.
Pathnames of single-linked files can consist of up to 256 characters,
dependent on the position of slashes.
Files with multiple links can only be archived
if the first link encountered is no longer than 100 characters.
Due to implementation errors,
file names longer than 99 characters
can not considered to be generally portable.
Another addition of the
.I ustar
format
are fields for the symbolic user and group IDs.
These fields are created by
.IR pax ,
but ignored when reading such archives.
.PP
With
.BR "\-x tar" ,
a variant of the
.I ustar
format is selected
which stores file type bits in the mode field
to work around common implementation problems.
These bits are ignored by
.I pax
when reading archives.
.PP
The
.B pax
format is an extension to the
.I ustar
format.
If attributes cannot be archived with
.IR ustar ,
an extended header is written.
Unless the size of an entry is greater than 8\ GB,
a
.I pax
archive should be readable by any implementation                               
capable of reading
.I ustar
archives,
although files may be extracted under wrong names
and extended headers may be extracted as separate files.
If a file name contains non-UTF-8 characters,
it may not be archived or extracted correctly
because of a problem of the
.I pax
format specification.
.PP
The
.B sun
format extends the
.I ustar
format similar as the
.I pax
format does.
The extended headers in
.I sun
format archives are not understood
by implementations that support only the
.I pax
format and vice-versa.
The
.I sun
format has also problems with non-UTF-8 characters in file names.
.PP
The
.B GNU
.I tar
format is mostly compatible with the other
.I tar
formats,
unless an archive entry actually uses its extended features.
There are no practical limitations on files archived with this format.
The implementation of
.I pax
is limited to expanded numerical fields
and long file names;
in particular,
there is no support for sparse files or incremental backups.
If
.I pax
creates a multi-volume
.I GNU
archive,
it just splits a single-volume archive in multiple parts,
as with the other formats;
.I GNU
multi-volume archives are not supported.
.PP
The
.B bar
format is similar to the
.I tar
format, but can store longer file names.
It requires special implementation support to be read.
.PP
The
.B zip
format can be read in many non-Unix environments.
There are several restrictions on archives
intended for data exchange:
only regular files should be stored;
file times, permissions and ownerships
might be ignored by other implementations;
there should be no more than 65536 files in the archive;
the total archive size should not exceed 2 GB;
only
.I deflate
compression should be used.
Otherwise,
.I pax
stores all information available with other archive formats
in extended
.I zip
file headers,
so if archive portability is of no concern,
the
.I zip
implementation in
.I pax
can archive complete Unix file hierarchies.
.I Pax
supports the
.I zip64
format extension for large files;
it automatically writes
.I zip64
entries if necessary.
.I Pax
can extract all known
.I zip
format compression codes.
It does not support
.I zip
encryption.
Multi-volume
.I zip
archives are created as splitted single-volume archives,
as with the other formats written by
.IR pax ;
generic multi-volume
.I zip
archives are not supported.
.SH EXAMPLES
Extract all files named
.I Makefile
or
.I makefile
from the archive stored on
.IR /dev/rmt/c0s0 ,
overwriting recent files:
.RS 2
.sp
pax \-r \-f /dev/rmt/c0s0 \'[Mm]akefile\' \'*/[Mm]akefile\'
.RE
.PP
List the files contained in a software distribution archive:
.RS 2
.sp
pax \-v \-f distribution.tar.gz
.RE
.PP
Write a
.IR gzip (1)
compressed
.I ustar
archive containing all files below the directory
.I \%project
to the file
.IR \%project.tar.gz ,
excluding all directories named
.I CVS
or
.I SCCS
and their contents:
.RS 2
.sp
find project \-depth \-print | egrep \-v \'/(CVS|SCCS)(/|$)\' |
.br
      pax \-wd \-x ustar | gzip \-c > project.tar.gz
.RE
.PP
Copy the directory
.I work
and its contents
to the directory
.IR \%savedfiles ,
preserving all file attributes:
.RS 2
.sp
pax \-rw \-pe work savedfiles
.RE
.PP
Self-extracting zip archives are not automatically recognized,
but can normally be read using the
.I \-K
option, as with
.RS 2
.sp
pax \-rK \-x zip \-f archive.exe
.sp
.RE
.SH "ENVIRONMENT VARIABLES"
.TP
.BR LANG ", " LC_ALL
See
.IR locale (7).
.TP
.B LC_CTYPE
Selects the mapping of bytes to characters
used for matching patterns
and regular expressions.
.TP
.B LC_TIME
Sets the month names printed in list mode.
.SH "SEE ALSO"
cpio(1),
find(1),
tar(1)
.SH DIAGNOSTICS
.I Pax
exits with
.sp
.TS
l8fB l.
0	after successful operation;
1	on usage errors;
2	when operation was continued after minor errors;
3	on fatal error conditions.
.TE
.SH NOTES
Device and inode numbers
are used for hard link recognition
with the various cpio formats.
Since the header space cannot hold
large numbers present in current file systems,
devices and inode numbers are set on a per-archive basis.
This enables hard link recognition with all cpio formats,
but the link connection to files appended with
.I \-a
is not preserved.
.PP
If a numeric user or group id does not fit
within the size of the header field in the selected format,
files are stored with the user id (or group id, respectively)
set to 60001.
.PP
Use of the
.I \-a
option with a
.I zip
format archive may cause data loss
if the archive was not previously created by
.I cpio
or
.I pax
itself.
.PP
If the file names passed to
.I "pax -w"
begin with a slash character,
absolute path names are stored in the archive
and will be extracted to these path names later
regardless of the current working directory.
This is normally not advisable,
and relative path names should be passed to
.I pax
only.
The
.I \-s
option can be used to substitute relative for absolute path names
and vice-versa.
.PP
.I Pax
does not currently accept the
\fB\-o delete\fR,
\fB\-o exthdr.name\fR,
\fB\-o globexthdr.name\fR,
\fB\-o invalid\fR,
\fB\-o listopt\fR,
and
\fB\-o keyword\fR
options from POSIX.1-2001.