MPE/iX Shell and Utilities Reference Manual, Vol 1

cpio(1) MPE/iX Shell and Utilities cpio(1)
NAME
cpio — archiver to copy and back up files
SYNOPSIS
cpio –o [–aBcvyz][–C blocksize][–O file][–V volpat]
cpio –i [–BbcdfmrsStuv6qyz][–C blocksize][–I file][–V volpat][pattern ...]
cpio –p [–aBdlmruv] directory
DESCRIPTION
Note: The
MPE/iX implementation of this utility does not function exactly as this man page
describes. For details, see the MPE/iX NOTES section at the end of this man page.
The cpio command manipulates files called cpio archives.Acpio archive is a concatena-
tion of files and directories preceded by a header giving the file name and other file system
information. With cpio, you can create a new archive, extract contents of an existing
archive, list archive contents, and copy files from one directory to another.
Options
Every call to cpio must specify one and only one of the following selector options:
–i reads an existing archive (created with the –o option) from the standard input.
Unless you specify the –t option, cpio extracts all files matching one or more of the
given pattern arguments from the archive. Patterns are the same as those used by file
name generation (see sh(1)). When you do not specify a pattern argument, the
default pattern * is used; as a result, cpio extracts all files.
–o writes a new archive to the standard output, using the list of files read from the stan-
dard input. Such a list might be produced by the ls or find commands. For
example,
ls . | cpio –o >arch
uses ls to list the files of the current directory, then pipes this list as input to cpio.
The resulting archive contains the contents of all the files, and is written to arch.
–p is shorthand for
cpio –o | (cd directory; cpio –i)
where the cpio –i is performed in the given directory. You can use this option to
copy entire file trees.
Consult the synopsis lines to determine which of the following additional options can be
applied with a particular selector option.
Commands and Utilities 1-133