Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
pax(1) OSS Shell and Utilities Reference Manual
standard output file. If the standard input file is a disk file, the file should be a text file with one
pathname per line and no leading or trailing blanks.
Operands
directory The destination directory pathname for copy mode.
file The pathname of a file to be copied or archived.
pattern A pattern matching one or more pathnames of archive members. The default action, if
no pattern is specified, is to select all members in the archive.
Flag Interaction and Processing Order
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, accord-
ing 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 accord-
ing 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, pax does not consider a file selected unless it is newer
than the file to which it is compared.
Modes
The action taken by pax depends on the presence of the -r and -w flags. Four combinations of
these two flags 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 flag is specified, the pax command writes the names of the
members of the archive file read from the standard input file, with pathnames matching the
specified patterns, to the standard output file. If a named file is a directory, the file hierarchy con-
tained in the directory is also written.
You can specify the pax command without the -r or -w flags using the -c, -d, -f, -n, -s, and -v
flags and with the pattern operand.
If neither the -r nor -w flags are present, pax lists the contents of the specified archive, one file
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 file that is being extracted and link-
name is the name of a file that appeared earlier in the archive.
If intermediate directories are necessary to extract an archive member, pax creates the directories
with access permissions set as the bitwise inclusive OR of the values of S_IRWXU, S_IRWXG,
and S_IRWXO.
7−16 Hewlett-Packard Company 527188-004