pax.1 (2011 09)

p
pax(1) pax(1)
NAME
pax - extracts, writes, and lists archive files; copies files and directory hierarchies
SYNOPSIS
Listing Member Files of Archived Files
pax [-cdnv][-H|
-L][-A][-f archive ][-o options ]... [-s replstr ]... [pattern ]...
Extracting Archive Files
pax -r [-cdiknuvy][-H|
-L][-A][-f archive ][-o options ]... [-p string ]...
[
-s replstr ]... [pattern ]...
Writing Archive Files
pax -w [-adituvXy][-H
|-L][-A][-b blocking ][-f archive ][-o options ]... [
-s replstr ]...
[
-x format ][file ]...
Copying Files
pax -r -w [-diklntuvXy][-H
|-L][-A][-o options ]... [-p string ]... [-s replstr ]...
[file]... directory
DESCRIPTION
The
pax command extracts and writes member files of archive files; writes lists of the member files of
archives; and copies directory hierarchies. The -r and -w flags specify the archive operation performed
by the pax command.
The pattern argument specifies a pattern that matches one or more paths of archive members. A
\
(backslash) character is not recognized in the pattern argument and it prevents the subsequent character
from having any special meaning. If no pattern argument is specified, all members are selected in the
archive.
If a pattern argument is specified, but no archive members are found that match the pattern specified, the
pax command detects the error, exits with a nonzero exit status, and writes a diagnostic message.
The
pax command can read both tar and cpio archives. In the case of cpio, this means that
pax
can read ASCII archives (which are created with cpio -c) and binary archives (which are created
without the -c flag).
pax can also write archives that tar and cpio can read; by default, pax writes archives in the
ustar
extended tar interchange format. pax also writes ASCII cpio archives; use the -x cpio flag to
specify this extended cpio output format.
pax also reads and writes archives in the pax interchange format, IEEE Std 1003.1, 2003 Edition. Use
the -x pax flag to specify this format. Refer to the description of the -x format
option for more
details.
The supported archive formats are automatically detected on input. All three formats are explained in
greater detail under EXTENDED DESCRIPTION.
The four combinations of
-r and -w are referred to as the four modes of operation: list, read, write,
and copy modes, corresponding respectively to the four forms shown in the SYNOPSIS section.
list In list mode (when neither -r nor -w are specified), pax shall write the names of the
members of the archive file read from the standard input, with pathnames matching the
specified patterns, to standard output. If a named file is of type directory, the file hierarchy
rooted at that file shall be listed as well.
read In read mode (when -r is specified, but -w is not), pax shall extract the members of the
archive file read from the standard input, with pathnames matching the specified patterns. If an
extracted file is of type directory, the file hierarchy rooted at that file shall be extracted as well.
The extracted files shall be created performing pathname resolution with the directory in which
pax was invoked as the current working directory.
If an attempt is made to extract a directory when the directory already exists, this shall not be
considered an error. If an attempt is made to extract a FIFO when the FIFO already exists, this
shall not be considered an error.
write In write mode (when -w is specified, but -r is not), pax shall write the contents of the file
operands to the standard output in an archive format. 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
HP-UX 11i Version 3: September 2011 1 Hewlett-Packard Company 1

Summary of content (14 pages)