pax.1 (2011 09)

p
pax(1) pax(1)
RETURN VALUE
The pax command returns a value of 0 (zero) if all files were successfully processed; otherwise,
pax
returns a value greater than 0 (zero).
EXAMPLES
To copy the contents of the current directory to the tape drive, enter:
pax -w -f /dev/rtape/tape4QIC150 .
To copy the olddir directory hierarchy to
newdir enter:
mkdir newdir
pax -rw olddir newdir
To read the archive a.pax, with all files rooted in the directory
/usr in the archive extracted relative to
the current directory, enter:
pax -r -s ’,//*usr//*,,’ -f a.pax
All of the preceding examples create archives in
tar format.
The following pairs of commands demonstrate conversions from
cpio and tar to pax. In all cases, the
examples show comparable command-line usage rather than identical output formats. The
-x flag can
be specified to the
pax commands shown here, producing archives to select specific output formats:
ls * | cpio -ocv
pax -wdv *
find /mydir -type f -print | cpio -oc
find /mydir -type f -print | pax -w
cpio -icdum < archive
pax -r < archive
(cd /fromdir;find . -print) | cpio -pdlum /todir
pax -rwl /fromdir /todir
tar cf archive *
pax -w -f archive *
tar xfv - < archive
pax -rv < archive
(cd /fromdir; tar cf-.)|(cd/todir; tar xf -)
pax -rw /fromdir /todir
Note: When you use the -i flag (interactively renames files) on files to which there are hard links,
pax
does not create hard links to the renamed files.
WARNINGS
Because of industry standards and interoperability goals,
pax does not support the archival of files of size
8GB or larger for both ustar and cpio formats. Also, pax does not support user and group IDs
greater than or equal to 2048K for ustar format. pax does not support and user and group IDs greater
than or equal to 256K for cpio format. With ustar format, files with user IDs greater than or equal to
2048K are restored under the user ID of the current process, unless the user name exists. The same
applies for group IDs. In cpio format, files with user or group IDs greater than or equal to 256K will not
be recovered with the original user or group IDs respectively.
For backward compatibility with previous releases of the command,
pax will automatically determine a
block size up to 32,768 on input.
AUTHOR
pax was developed by Mark H. Colburn, OSF, and HP.
SEE ALSO
ed(1), tar(4), disk(7), mt(7).
STANDARDS CONFORMANCE
pax: XPG4, POSIX.2
HP-UX 11i Version 3: September 2011 13 Hewlett-Packard Company 13