MPE/iX Shell and Utilities Reference Manual, Vol 2

pax(1) MPE/iX Shell and Utilities pax(1)
pax stores extracted components under the current directory. Extracted directories
become subdirectories of the current directory. Ownership and permissions of the
extracted files are discussed under the –p option.
If you specify –w but not –r, you are in write mode. In this mode, pax writes out an
archive file that contains the specified pathnames as components. If a pathname is a
directory, the archive file contains all the files and subdirectories under that directory. If
you do not specify any pathnames, pax reads the standard input to get a list of path
names to select; the input should give one path name per line.
If you specify both –r and –w, you are in copy mode. In this mode, pax reads the speci-
fied pathnames and copies them to the specified directory. In this case, the given direc-
tory must already exist and you must be able to write to that directory. If a pathname is a
directory, pax copies all the files and subdirectories under that directory as well as the
directory itself. If you do not specify any pathnames, pax reads the standard input to get
a list of path names to copy; the input should give one path name per line.
pax can read input archives in cpio and tar format. It can also write these formats; see the
–x option.
On
POSIX-compliant systems, you need appropriate privileges to create block or character spe-
cial files.
Patterns
Command line patterns behave similarly to the wild card constructs explained in sh(1)
including the fact that wild card characters do not match the slash character (/). For example,
the pattern * stands for any string of characters excluding slash characters. A pattern like
*.c therefore selects all files with the suffix .c under the current directory.
If you do not specify any patterns on a command line that accepts patterns, pax assumes that
all files and directories match. As a result pax will act on the entire contents of the current
directory, plus the entire contents of all its subdirectories.
Options
pax accepts the following options. Some of them are only appropriate to some forms of the
command, as shown in the SYNOPSIS.
–a appends specified files/directories to the end of the contents of an existing archive. If
the archive doesn’t already exist, pax creates it.
–b block
specifies the output blocksize. Each output operation writes block bytes, where block
is an integer appropriate to the output device. If b follows the block number, block-
size is measured in 512-byte blocks. If k follows the block number, the blocksize is
measured in 1024-byte blocks. The default block is 10k for tar archives, 5k for
cpio archives. The blocksize must be at least 512 bytes for reading.
Commands and Utilities 1-417