HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
p
pax(1) pax(1)
-k Prevents the
pax command from writing over existing files.
-l Links files when copying files. When both
-r and -w are specified, hard links are esta-
blished between the source and destination file hierarchies whenever possible.
-n Selects the first archive member that matches each pattern argument. No more than one
archive member is matched for each pattern (although members of type directory will still
match the file hierarchy rooted at that file).
-p string Specifies one or more file characteristics to be retained or discarded on extraction. The
string argument consists of the characters a
, e, m, o, and p. Multiple characteristics can
be concatenated within the same string and multiple
-p flags can be specified. The
specification flags have the following meanings:
a Does not retain file-access times.
e Retains the user ID, group ID, access permission, access time, and modification time.
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 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]
where as 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 nonnull character can be used as a delimiter (the
/ (slash) character is the delimiter
in the previous format). Multiple -s flag expressions can be specified; the expressions 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 hierar-
chy 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.
HP-UX 11i Version 1: September 2005 − 2 − Hewlett-Packard Company Section 1−−703