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

p
pax(1) pax(1)
of the files in the file hierarchy rooted at the file.
copy In copy mode (when both -r and
-w are specified), pax shall copy the file operands to the des-
tination directory.
If no file operands are specified, a list of files to copy, one per line, shall be read from the standard
input. A file of type directory shall include all of the files in the file hierarchy rooted at the file.
The effect of the copy shall be as if the copied files were written to an archive file and then subse-
quently extracted, except that there may be hard links between the original and the copied files. If
the destination directory is a subdirectory of one of the files to be copied, the results are
unspecified. It shall be an error for the file named by the directory operand not to exist, not be
writable by the user, or not be a file of type directory.
In
read or copy modes, if intermediate directories are necessary to extract an archive member,
pax
shall perform actions equivalent to the mkdir() function defined in the System Interfaces volume of IEEE
Std 1003.1-2001, called with the following arguments:
1. The intermediate directory used as the path argument
2. The value of the bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO as the mode argu-
ment
If the selected archive format supports the specification of linked files, it shall be an error if these files can-
not be linked when the archive is extracted, except that if the files to be linked are symbolic links then
separate copies of the symbolic link shall be created instead. For archive formats that do not store le con-
tents with each name that causes a hard link, if the file that contains the data is not extracted during this
pax session, a diagnostic message shall be displayed with the name of a file that can be used to extract the
data.
Options
-a Appends files to the end of the archive. Certain devices might not support appending.
-b blocking Specifies the block size for output to be the positive decimal integer of bytes specified by the
blocking argument. The block size value cannot exceed 32,256. Blocking is automatically
determined on input.
Do not specify a value for the blocking argument larger than 32768. Default blocking when
creating archives depends on the archive format. (See the -x flag description.)
-c Matches all file or archive members except those specified by the pattern or file arguments.
-d Causes directories being copied or archived, or archived directories being extracted, to
match only the directory or archived directory itself and not the contents of the directory or
archived directory.
-f archive Specifies the path of an archive file to be used instead of standard input (when the
-w flag
is not specified) or the standard output (when the
-w flag is specified but the
-r flag is
not). When specified with the
-a flag, any files written to the archive are appended to the
end of the archive.
-H If a symbolic link referencing a file of type directory is specified on the command line,
pax
shall archive the file hierarchy rooted in the file referenced by the link, using the name of
the link as the root of the file hierarchy. Otherwise, if a symbolic link referencing a file of
any other file type which pax can normally archive is specified on the command line, then
pax shall archive the file referenced by the link, using the name of the link. The default
behavior shall be to archive the symbolic link itself.
-i Renames files or archives interactively. For each archive member that matches the pattern
argument or file that matches a file argument, a prompt is written to the terminal
(
/dev/tty) that contains the name of a file or archive member. A line is then read from
the terminal. If this line is empty, the file or archive member is skipped. If this line consists
of a dot, the file or archive member is processed with no modification to its name. Other-
wise, its name is replaced with the contents of the line. The pax command immediately
exits with a nonzero exit status if an End-of-File is encountered when reading a response or
if it cannot read or write to the terminal.
-k Prevents the pax command from writing over existing files.
106 Hewlett-Packard Company 2 HP-UX 11i Version 3: February 2007