Name
cpio
Synopsis
cpiocontrol_options
[options
]
Copies
file
archives in from or out to disk or to another location on the local
machine. Note that until native drivers for tape drives exist for Mac
OS X, cpio
can’t write to tape.
Each of the three control options, -i
,
-o
, or -p
, accepts different
options. (See also ditto
, pax
,
and tar
.)
cpio
doesn’t preserve resource
forks or metadata when copying files that contain them. For such
files, use ditto
instead.
-
cpio -i
[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 they are interpreted bycpio
, not by the shell.) If no pattern is used, all files are copied in. During extraction, existing files aren’t overwritten by older versions in the archive (unless-u
is specified).-
cpio -o
[options
] Copy out a list of files whose names are given on the standard input.
-
cpio -p
[options
]directory
Copy 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:
b B c C d E f H I m r s S t u v 6o:
a A B c C H L O vp:
a d l L m u v
Options
-
-a
Reset access times of input files.
-
-A
Append files to an archive (must use with
-O
).-
-b
Swap bytes and half-words. Words are 4 bytes.
Get Mac OS X Panther in a Nutshell, 2nd 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.