paxcpio - copy file archives in and out
/usr/5bin/paxcpio -o [ aBcv ]
/usr/5bin/paxcpio -i [ Bcdfmrtuv ] [ pattern... ]
/usr/5bin/paxcpio -p [ adlmruv ] directory
paxcpio is available with the System V software installation option.
Refer to for information on how to install optional software.
paxcpio produces and reads files in the format specified by the cpio
Archive/Interchange File Format specified in IEEE Std. 1003.1-1988.
When specified with the -i argument, paxcpio extracts files from the
standard input, which is assumed to be the product of a previous `paxc-
pio -o'. Only files with names that match pattern are selected. pat-
tern is a simple regular expression given in the name-generating nota-
tion of the shell. Multiple patterns may be specified, and if no pat-
tern is specified, the default is `*', selecting all files. The
extracted files are conditionally created and copied into the current
directory, and possibly any levels below, based upon the options speci-
fied. The permissions of the files will be those of the previous `pax-
cpio -o'. The owner and group of the files will be that of the current
user unless the user has appropriate privileges, in which case paxcpio
retains the owner and group of the files of the previous `paxcpio -o'.
When specified with the -p argument, paxcpio reads the standard input
to obtain a list of files that are conditionally created and copied
into the destination directory based upon the options described below.
If an error is detected, the cause is reported and paxcpio continues to
copy other files. paxcpio will skip over any unrecognized files that
it encounters in the archive.
The following restrictions apply to paxcpio:
o Pathnames are restricted to 256 characters.
o Appropriate privileges are required to copy special
o Blocks are reported in 512-byte quantities.
-a Reset access times of input files after they have been copied.
When the -l option is also specified, the linked files do not
have their access times reset. Can only be used with the -i or
-B Input/output is to be blocked 5120 bytes to the record. Can
only be used with the -i or -o arguments for data that is
directed to or from character special files.
-c Write header information in ASCII character for for portability.
Can only be used with the -i or -o arguments. Note: this option
should always be used to write portable files.
-d Create directories as needed. Can only be used with the -i or
-f Copy in all files except those in patterns. Can only be used
with the -i argument.
-l Whenever possible, link files rather than copying them. Can
only be used with the -p argument.
-m Retain previous modification times. This option is ineffective
on directories that are being copied. Can only be used with the
-i or -p arguments.
-r Interactively rename files. The user is asked whether to rename
pattern each invocation. Read and write permissions for
/dev/tty are required for this option. If the user types a null
line, the file is skipped. Should only be used with the -i or
-t Print a table of contents of the input. No files are created.
Can only be used with the -i argument.
-u Copy files unconditionally; usually an older file will not
replace a new file with the same name. Can only be used with
the -i or -p arguments.
-v Verbose. Print the names of the affected files. Can only be
used with the -i argument. Provides a detailed listing when
used with the -t option.
The following command:
ls | paxcpio -o >> ../newfile
copies out the files listed by ls(1V) and redirects them to the file
The following command:
cat newfile | paxcpio -id "memo/al" "memo/b*"
uses the output file newfile from paxcpio -o, takes those files that
match the patterns "memo/al" and "memo/b*", creates the directories
below the current directory, and places the files in the appropriate
find . -depth -print | paxcpio -pdlmv newdir
takes the file names piped to it from find(1) and copies or links those
files to another directory named newdir, while retaining the modifica-
paxcpio exits with one of the following values:
0 All input files were copied.
2 paxcpio encountered errors in copying or accessing files or
directories. An error will be reported for nonexistent files or
directories, or permissions that do not allow the user to access
the source or target files.
/dev/tty used to prompt the user for information when the -i
or -r options are specified
cpio(1), find(1), pax(1V), tar(1), ustar(1V), cpio(5), tar(5)
IEEE Std. 1003.1-1988
It is important to use the -depth option of find(1) to generate path-
names for paxcpio. This eliminates problems paxcpio could have trying
to create files under read-only directories.
Mark H. Colburn
117 Mackubin Street, Suite 1
St. Paul, MN 55102
Sponsored by The USENIX Association for public distribution.
19 September 1989 PAXCPIO(1V)