|
|
coherent
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
NNNNAAAAMMMMEEEE
pax - portable archive exchange
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ppppaaaaxxxx [----cccciiiimmmmooooppppuuuuvvvvyyyy] [----ffff _a_r_c_h_i_v_e] [----ssss _r_e_p_l_s_t_r] [----tttt _d_e_v_i_c_e]
[_p_a_t_t_e_r_n...]
ppppaaaaxxxx ----rrrr [----cccciiiimmmmnnnnooooppppuuuuvvvvyyyy] [----ffff _a_r_c_h_i_v_e] [----ssss _r_e_p_l_s_t_r] [----tttt _d_e_v_i_c_e]
[_p_a_t_t_e_r_n...]
ppppaaaaxxxx ----wwww [----aaaaddddiiiimmmmuuuuvvvvyyyy] [----bbbb _b_l_o_c_k_i_n_g] [----ffff _a_r_c_h_i_v_e] [----ssss _r_e_p_l_s_t_r]
[----tttt _d_e_v_i_c_e] [----xxxx _f_o_r_m_a_t] [_p_a_t_h_n_a_m_e...]
ppppaaaaxxxx ----rrrrwwww [----iiiillllmmmmooooppppuuuuvvvvyyyy] [----ssss _r_e_p_l_s_t_r] [_p_a_t_h_n_a_m_e...] directory
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_P_a_x reads and writes archive files which conform to the
AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt specified in _I_E_E_E _S_t_d.
_1_0_0_3._1-_1_9_8_8. _P_a_x can also read, but not write, a number of
other file formats in addition to those specified in the
AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt description. Support for
these traditional file formats, such as V7 _t_a_r and System V
binary _c_p_i_o format archives, is provided for backward
compatibility and to maximize portability.
_P_a_x will also support traditional _c_p_i_o and System V _t_a_r
interfaces if invoked with the name "cpio" or "tar"
respectively. See the _c_p_i_o(_1) or _t_a_r(_1) manual pages for
more details.
Combinations of the ----rrrr and ----wwww command line arguments specify
whether _p_a_x will read, write or list the contents of the
specified archive, or move the specified files to another
directory.
The command line arguments are:
----wwww writes the files and directories specified by _p_a_t_h_n_a_m_e
operands to the standard output together with the
pathname and status information prescribed by the
archive format used. A directory _p_a_t_h_n_a_m_e operand
refers to the files and (recursively) subdirectories of
that directory. If no _p_a_t_h_n_a_m_e operands are given,
then the standard input is read to get a list of
pathnames to copy, one pathname per line. In this
case, only those pathnames appearing on the standard
input are copied.
----rrrr _P_a_x reads an archive file from the standard input.
Only files with names that match any of the _p_a_t_t_e_r_n
operands are selected for extraction. The selected
files are conditionally created and copied relative to
Page 1 (printed 10/10/90)
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
the current directory tree, subject to the options
described below. By default, the owner and group of
selected files will be that of the invoking process,
and the permissions and modification times will be the
sames as those in the archive.
The supported archive formats are automatically
detected on input. The default output format is _u_s_t_a_r,
but may be overridden by the ----xxxx _f_o_r_m_a_t option described
below.
----rrrrwwww _P_a_x reads the files and directories named in the
_p_a_t_h_n_a_m_e operands and copies them to the destination
_d_i_r_e_c_t_o_r_y. A directory _p_a_t_h_n_a_m_e operand refers to the
files and (recursively) subdirectories of that
directory. If no _p_a_t_h_n_a_m_e operands are given, the
standard input is read to get a list of pathnames to
copy, one pathname per line. In this case, only those
pathnames appearing on the standard input are copied.
The directory named by the _d_i_r_e_c_t_o_r_y operand must exist
and have the proper permissions before the copy can
occur.
If neither the ----rrrr or ----wwww options are given, then _p_a_x will
list the contents of the specified archive. In this mode,
_p_a_x lists normal files one per line, hard link pathnames as
_p_a_t_h_n_a_m_e == _l_i_n_k_n_a_m_e
and symbolic link pathnames (if supported by the
implementation) as
_p_a_t_h_n_a_m_e -> _l_i_n_k_n_a_m_e
where _p_a_t_h_n_a_m_e is the name of the file being extracted, and
_l_i_n_k_n_a_m_e is the name of a file which appeared earlier in the
archive.
If the ----vvvv option is specified, then _p_a_x list normal
pathnames in the same format used by the _l_s utility with the
----llll option. Hard links are shown as
<_l_s -_l _l_i_s_t_i_n_g> == _l_i_n_k_n_a_m_e
and symbolic links (if supported) are shown as
<_l_s -_l _l_i_s_t_i_n_g> -> _l_i_n_k_n_a_m_e
_P_a_x is capable of reading and writing archives which span
multiple physical volumes. Upon detecting an end of medium
on an archive which is not yet completed, _p_a_x will prompt
Page 2 (printed 10/10/90)
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
the user for the next volume of the archive and will allow
the user to specify the location of the next volume.
OOOOppppttttiiiioooonnnnssss
The following options are available:
----aaaa The files specified by _p_a_t_h_n_a_m_e are appended to
the specified archive.
----bbbb _b_l_o_c_k_i_n_g
Block the output at _b_l_o_c_k_i_n_g bytes per write to
the archive file. A kkkk suffix multiplies _b_l_o_c_k_i_n_g
by 1024, a bbbb suffix multiplies _b_l_o_c_k_i_n_g by 512 and
a mmmm suffix multiplies _b_l_o_c_k_i_n_g by 1048576 (1
megabyte). For machines with 16-bit int's (VAXen,
XENIX-286, etc.), the maximum buffer size is 32k-
1. If not specified, _b_l_o_c_k_i_n_g is automatically
determined on input and is ignored for ----rrrrwwww....
----cccc Complement the match sense of the _p_a_t_t_e_r_n
operands.
----dddd Intermediate directories not explicitly listed in
the archive are not created. This option is
ignored unless the ----rrrr option is specified.
----ffff _a_r_c_h_i_v_e
The _a_r_c_h_i_v_e option specifies the pathname of the
input or output archive, overriding the default of
standard input for ----rrrr or standard output for ----wwww.
----iiii Interactively rename files. Substitutions
specified by ----ssss options (described below) are
performed before requesting the new file name from
the user. A file is skipped if an empty line is
entered and _p_a_x exits with an exit status of 0 if
EEEEOOOOFFFF is encountered.
----llll Files are linked rather than copied when possible.
----mmmm File modification times are not retained.
----nnnn When ----rrrr is specified, but ----wwww is not, the _p_a_t_t_e_r_n
arguments are treated as ordinary file names.
Only the first occurrence of each of these files
in the input archive is read. The ppppaaaaxxxx utility
exits with a zero exit status after all files in
the list have been read. If one or more files in
the list is not found, ppppaaaaxxxx writes a diagnostic to
standard error for each of the files and exits
with a non-zero exit status. the file names are
compared before any of the ----iiii, ----ssss, or ----yyyy options
Page 3 (printed 10/10/90)
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
are applied.
----oooo Restore file ownership as specified in the
archive. The invoking process must have
appropriate privileges to accomplish this.
----pppp Preserve the access time of the input files after
they have been copied.
----ssss _r_e_p_l_s_t_r
File names are modified according to the
substitution expression using the syntax of _e_d(_1)
as shown:
-s /_o_l_d/_n_e_w/[[[[gp]]]]
Any non null character may be used as a delimiter
(a / is used here as an example). Multiple ----ssss
expressions may be specified; the expressions are
applied in the order specified terminating with
the first successful substitution. The optional
trailing pppp causes successful mappings to be listed
on standard error. The optional trailing gggg causes
the _o_l_d expression to be replaced each time it
occurs in the source string. Files that
substitute to an empty string are ignored both on
input and output.
----tttt _d_e_v_i_c_e The _d_e_v_i_c_e option argument is an implementation-
defined identifier that names the input or output
archive device, overriding the default of standard
input for ----rrrr and standard output for ----wwww.
----uuuu Copy each file only if it is newer than a pre-
existing file with the same name. This implies
----aaaa.
----vvvv List file names as they are encountered. Produces
a verbose table of contents listing on the
standard output when both ----rrrr and ----wwww are omitted,
otherwise the file names are printed to standard
error as they are encountered in the archive.
----xxxx _f_o_r_m_a_t Specifies the output archive _f_o_r_m_a_t. The input
format, which must be one of the following, is
automatically determined when the ----rrrr option is
used. The supported formats are:
_c_p_i_o The extended _C_P_I_O interchange format
specified in EEEExxxxtttteeeennnnddddeeeedddd CCCCPPPPIIIIOOOO FFFFoooorrrrmmmmaaaatttt iiiinnnn _I_E_E_E
_S_t_d. _1_0_0_3._1-_1_9_8_8.
Page 4 (printed 10/10/90)
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
_u_s_t_a_r The extended _T_A_R interchange format
specified in EEEExxxxtttteeeennnnddddeeeedddd TTTTAAAARRRR FFFFoooorrrrmmmmaaaatttt iiiinnnn _I_E_E_E
_S_t_d. _1_0_0_3._1-_1_9_8_8. This is the default
archive format.
----yyyy Interactively prompt for the disposition of each
file. Substitutions specified by ----ssss options
(described above) are performed before prompting
the user for disposition. EEEEOOOOFFFF or an input line
starting with the character qqqq caused _p_a_x to exit.
Otherwise, an input line starting with anything
other than yyyy causes the file to be ignored. This
option cannot be used in conjunction with the ----iiii
option.
Only the last of multiple ----ffff or ----tttt options take effect.
When writing to an archive, the standard input is used as a
list of pathnames if no _p_a_t_h_n_a_m_e operands are specified.
The format is one pathname per line. Otherwise, the
standard input is the archive file, which is formatted
according to one of the specifications in
AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee ffffoooorrrrmmmmaaaatttt in _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8, or
some other implementation-defined format.
The user ID and group ID of the process, together with the
appropriate privileges, affect the ability of _p_a_x to restore
ownership and permissions attributes of the archived files.
(See _f_o_r_m_a_t-_r_e_a_d_i_n_g _u_t_i_l_i_t_y in AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee
FFFFoooorrrrmmmmaaaatttt in _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8.)
The options ----aaaa, ----cccc, ----dddd, ----iiii, ----llll, ----pppp, ----tttt, ----uuuu, and ----yyyy are
provided for functional compatibility with the historical
_c_p_i_o and _t_a_r utilities. The option defaults were chosen
based on the most common usage of these options, therefore,
some of the options have meanings different than those of
the historical commands.
OOOOppppeeeerrrraaaannnnddddssss
The following operands are available:
_d_i_r_e_c_t_o_r_y The destination directory pathname for copies when
both the ----rrrr and ----wwww options are specified. The
directory must exist and be writable before the
copy or and error results.
_p_a_t_h_n_a_m_e A file whose contents are used instead of the
files named on the standard input. When a
directory is named, all of its files and
(recursively) subdirectories are copied as well.
_p_a_t_t_e_r_n A _p_a_t_t_e_r_n is given in the standard shell pattern
Page 5 (printed 10/10/90)
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
matching notation. The default if no _p_a_t_t_e_r_n is
specified is ****, which selects all files.
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
The following command
pax -w -f /dev/rmt0 .
copies the contents of the current directory to tape drive
0.
The commands
mkdir _n_e_w_d_i_r
cd _o_l_d_d_i_r
pax -rw . _n_e_w_d_i_r
copies the contents of _o_l_d_d_i_r to _n_e_w_d_i_r .
The command
pax -r -s ',//*usr//*,,' -f pax.out
reads the archive ppppaaaaxxxx....oooouuuutttt with all files rooted in "/usr" in
the archive extracted relative to the current directory.
FFFFIIIILLLLEEEESSSS
/dev/tty used to prompt the user for information when the
----iiii or ----yyyy options are specified.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
cpio(1), find(1), tar(1), cpio(5), tar(5)
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
_P_a_x will terminate immediately, without processing any
additional files on the command line or in the archive.
EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
_P_a_x will exit with one of the following values:
0 All files in the archive were processed successfully.
>0 _P_a_x aborted due to errors encountered during operation.
BBBBUUUUGGGGSSSS
Special permissions may be required to copy or extract
special files.
Device, user ID, and group ID numbers larger than 65535
cause additional header records to be output. These records
are ignored by some historical version of _c_p_i_o(_1) and
_t_a_r(_1).
Page 6 (printed 10/10/90)
PPPPAAAAXXXX((((1111)))) CCCCOOOOHHHHEEEERRRREEEENNNNTTTT PPPPAAAAXXXX((((1111))))
The archive formats described in AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee
FFFFoooorrrrmmmmaaaatttt have certain restrictions that have been carried over
from historical usage. For example, there are restrictions
on the length of pathnames stored in the archive.
When getting an "ls -l" style listing on _t_a_r format
archives, link counts are listed as zero since the _u_s_t_a_r
archive format does not keep link count information.
On 16 bit architectures, the largest buffer size is 32k-1.
This is due, in part, to using integers in the buffer
allocation schemes, however, on many of these machines, it
is not possible to allocate blocks of memory larger than
32k.
CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
Copyright (c) 1989 Mark H. Colburn.
All rights reserved.
Redistribution and use in source and binary forms are
permitted provided that the above copyright notice is
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was
developed by Mark H. Colburn and sponsored by The USENIX
Association.
THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.
AAAAUUUUTTTTHHHHOOOORRRR
Mark H. Colburn
Minnetech Consulting, Inc.
117 Mackubin Street, Suite 1
St. Paul, MN 55102
[email protected]
Sponsored by TTTThhhheeee UUUUSSSSEEEENNNNIIIIXXXX AAAAssssssssoooocccciiiiaaaattttiiiioooonnnn for public distribution.
Page 7 (printed 10/10/90)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.