Name
cpio
Synopsis
cpiocontrol_options
[options
]
Copy file archives in from, or out to, tape or disk, or to another
location on the local machine. Each of the three control options,
-i
, -o
, or -p
accepts different options. (See also pax and tar.)
cpio -i [
options
][
patterns
]cpio --extract [
options
][
patterns
]Copy in (extract) files whose names match selected patterns. Each pattern can include filename metacharacters from the Bourne shell. (Patterns should be quoted or escaped so that they are interpreted by cpio, not by the shell.) If no pattern is used, all files are copied in. During extraction, existing files are not overwritten by older versions in the archive (unless
-u
is specified).cpio -o [
options
]cpio --create [
options
]Copy out a list of files whose names are given on the standard input.
cpio -p [
options
]directory
cpio --create [
options
]directory
Copy (pass) files to another directory on the same system. Destination pathnames are interpreted relative to the named directory.
Comparison of Valid Options
Options available to the -i
,
-o
, and -p
options are shown
respectively in the first, second, and third row below. (The
-
is omitted for
clarity.)
-i
: 6 b B c C d E f H I k m M n r R s S t u v V z Z-o
: 0 a A B c C F H L M O v V z Z-p
: 0 a d l L m P R u v V
Common Options
-a
,--reset-access-time
Reset access times of input files.
-A
,--append
Append files to an archive (must use with
-O
or-F
).-b
,--swap
Swap bytes and half-words to convert between big-endian and little-endian 32-bit integers. ...
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.