pax.1 (2011 09)

p
pax(1) pax(1)
m Does not retain file-modification times.
o Retains the user ID and the group ID.
p Retains the access permission.
Note that "retain" means that an attribute stored in the archive is given to the extracted
file, subject to the permissions of the invoking process; otherwise, the attribute is deter-
mined as part of the normal file creation action.
If neither the
e nor the o flag is specified, or the user ID and group ID are not retained,
the pax command does not set the S_ISUID
and S_ISGID bits of the access permis-
sion. If the retention of any of these items fails, the
pax command writes a diagnostic
message to standard error. Failure to retain any of the items affects the exit status, but
does not cause the extracted file to be deleted. If specification flags are duplicated or
conflict with each other, the ones given last shall take precedence. For example, if
-p
eme is specified, file-modification times are retained.
-r Reads an archive file from the standard input.
-s Modifies file-member or archive-member names specified by the pattern or file arguments
according to the substitution expression replstr , using the syntax of the
ed command.
The substitution expression has the following format:
-s/old/new/[gp]
whereas in the ed command, old is a basic regular expression and new can contain an &
(ampersand), \n (n is a digit) back references, or subexpression matching. The old string
can also contain newline characters.
Any non-null character can be used as a delimiter (the
/ (slash) character is the delim-
iter in the previous format). Multiple -s flag expressions can be specified; the expres-
sions are applied in the order specified, terminating with the first successful substitution.
The optional trailing g character performs as in the ed command. The optional trailing
p character causes successful substitutions to be written to the standard error. File-
member or archive-member names that substitute to the empty string are ignored when
reading and writing archives.
-t Causes the access times of the archived files to be the same as they were before being
read by the pax command.
-u Ignores files that are older (having a less recent file modification time) than a preexisting
file or archive member with the same name.
When extracting files (
-r flag), an archive member with the same name as a file in the
file system is extracted if the archive member is newer than the file.
When writing files to an archive file (
-w flag), an archive member with the same name as
a file in the file system is superseded if the file is newer than the archive member.
When copying files to a destination directory (
-rw flags), the file in the destination
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.
-v Writes information about the process. If neither the -r or -w flags are specified, the -v
flag produces a verbose table of contents that resembles the output of ls -l;otherwise,
archive-member pathnames are written to standard error.
-w Writes files to the standard output in the specified archive format.
-x format Specifies the output archive format. The pax command recognizes the following formats:
cpio Extended cpio interchange format. The default blocking value for this format
for character special archive files is 5120. Blocking values from 512 to 32,256 in
increments of 512 are supported.
pax The pax interchange format. See IEEE Std 1003.1, 2003 Edition. The default
block size for this format for character special archive files shall be 5120. Block-
ing values from 512 to 32,256 in increments of 512 are supported.
This is an extended
ustar format. The pax format should be used for archiv-
ing and extracting files having one or more of the following properties: size 8GB
or more, UID or GID greater than 2097151, user or group names longer than 31
6 Hewlett-Packard Company 6 HP-UX 11i Version 3: September 2011