HP-UX Reference (11i v3 07/02) - 1 User Commands N-Z (vol 2)

p
pax(1) pax(1)
Option Interaction and Processing Order
Specifying more than one of the mutually-exclusive options
-H and -L shall not be considered an error
and the last option specified shall determine the behavior of the utility.
The flags that operate on the names of files or archive members (
-c, -i, -n, -s, -u, and
-v) interact as
follows.
When extracting files (
-r flag), archive members are selected, using the modified names, according to the
user-specified pattern arguments as modified by the
-c, -n, and -u flags. Then, any -s and -i flags
modify, in that order, the names of the selected files. The
-v flag writes the names resulting from these
modifications.
When writing files to an archive file (
-w flag), or when copying files, the files are selected according to the
user-specified pathnames as modified by the
-n and -u flags. Then, any -s and -i flags modify, in that
order, the names resulting from these modifications. The
-v flag writes the names resulting from these
modifications.
If both the
-u and -n flags are specified, the
pax command does not consider a file selected unless it is
newer than the file to which it is compared.
Listing Member Files of Archived Files
You can specify the
pax command without the -r or -w flags with the
-H or -L, -c, -d, -f, -n, -o,
-s, and -v flags, and with the pattern argument.
If neither the -r or -w flags are included, pax lists the contents of the specified archive, one file per line.
If the -v flag is specified, the listing is output in the ls -l
command format. In the verbose listing pax
lists hard link pathnames as follows:
pathname==linkname
pax lists symbolic link pathnames as follows:
pathname->linkname
In the case of hard links, pathname is the name of the file that is being extracted, and linkname is the
name of a file that appeared earlier in the archive.
Extracting Archive Files
The
-r flag can be specified with the -H or -L, -c
, -d, -f, -n, -o, -s, and -v flags, and a pattern
argument.
Writing Archive Files
The
-w flag can be specified with the -H or -L, -b,
-d, -f, -i, -o, -s, -t, -u, -v, -x, and -X flags
and with file arguments.
If
-w is specified, but no files are specified, standard input is used. If neither
-f or -w are specified,
standard input must be an archive file.
Copying Files
The
-r and -w flags can be specified with the -H or -L
, -d, -i, -k, -l, -o, -p, -n, -s, -t, -u, -v,
and
-X flags and with the file arguments. A directory argument must be specified.
List Mode Format Specifications
In list mode with the -o listopt= format option, the format argument shall be applied for each
selected file. The pax utility shall append a newline to the listopt output for each selected file. The for-
mat argument shall be used as the format string described in the Base Definitions volume of IEEE Std
1003.1-2001, Chapter 5, File Format Notation, with the exceptions 1. through 5. defined in the EXTENDED
DESCRIPTION section of printf, plus the following exceptions:
1. through 5. Defined in the EXTENDED DESCRIPTION section of printf.
6. The sequence (keyword) can occur before a format conversion specifier. The conversion argument is
defined by the value of keyword. The implementation shall support the following keywords:
Any of the Field Name entries in ustar Header Block and Octet-Oriented cpio Archive Entry.
Any keyword defined for the extended header in pax Extended Header.
For example, the sequence "%(charset)s" is the string value of the name of the character set in
the extended header. Refer to the section EXTENDED DESCRIPTION for the list of keywords
HP-UX 11i Version 3: February 2007 7 Hewlett-Packard Company 111