Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

pax(1) OSS Shell and Utilities Reference Manual
DESCRIPTION
The pax utility reads and writes member les of archive les; writes lists of the member les of
archives; and copies directory hierarchies.
The -r and -w ags specify the archive operation performed by pax.
The name of the archive le can be specied with the -f ag. The archive le can be a disk le
or tape le on a mounted tape. If the -f ag is not specied, in read mode the archive le is
assumed to be the standard input le and in write mode the archive le is assumed to be the stan-
dard output le. If the standard input le is a disk le, the le should be a text le with one path-
name per line and no leading or trailing blanks.
Operands
directory The destination directory pathname for copy mode.
file The pathname of a le to be copied or archived.
pattern A pattern matching one or more pathnames of archive members. The default action, if
no pattern is specied, is to select all members in the archive.
Flag Interaction and Processing Order
The ags that operate on the names of les or archive members (-c, -i, -n, -s, -u, and -v) interact
as follows.
When extracting les (-r ag), archive members are selected, using the modied names, accord-
ing to the user-specied pattern arguments as modied by the -c, -n, and -u ags. Then, any -s
and -i ags modify, in that order, the names of the selected les. The -v ag writes the names
resulting from these modications.
When writing les to an archive le (-w ag), or when copying les, the les are selected accord-
ing to the user-specied pathnames as modied by the -n and -u ags. Then, any -s and -i ags
modify, in that order, the names resulting from these modications. The -v ag writes the names
resulting from these modications.
If both the -u and -n ags are specied, pax does not consider a le selected unless it is newer
than the le to which it is compared.
Modes
The action taken by pax depends on the presence of the -r and -w ags. Four combinations of
these two ags are possible. The combinations are referred to as list, read, write, and copy
modes. These modes correspond to the four forms of the command shown in SYNOPSIS.
List Mode
When neither the -r nor the -w ag is specied, the pax command writes the names of the
members of the archive le read from the standard input le, with pathnames matching the
specied patterns, to the standard output le. If a named le is a directory, the le hierarchy con-
tained in the directory is also written.
You can specify the pax command without the -r or -w ags using the -c, -d, -f, -n, -s, and -v
ags and with the pattern operand.
If neither the -r nor -w ags are present, pax lists the contents of the specied archive, one le
per line. pax lists hard link pathnames as follows:
pathname == linkname
pax lists symbolic link pathnames as follows:
pathname -> linkname
In both of the preceding cases, pathname is the name of the le that is being extracted and link-
name is the name of a le that appeared earlier in the archive.
716 Hewlett-Packard Company 527188-007