Manual Page Result
0
Command: cpio | Section: 1 | Source: UNIX v10 | File: cpio.1
CPIO(1) General Commands Manual CPIO(1)
NAME
cpio - copy file archives in and out
SYNOPSIS
cpio -o [ acBv ]
cpio -i [ BcdmrtuvfsSb6 ] [ pattern ... ]
cpio -p [ adlmruv ] directory
DESCRIPTION
Cpio -o (copy out) reads the standard input to obtain a list of path
names and copies those files onto the standard output together with
path name and status information.
Cpio -i (copy in) extracts files from the standard input which is as-
sumed to be the product of a previous cpio -o. Only files with names
that match the patterns are selected. Patterns are given in the name-
generating notation of sh(1); the default is * (all files). The ex-
tracted files are conditionally created and copied into the current di-
rectory tree based upon the options described below. File ownership is
preserved if possible.
Cpio -p (pass) reads from the standard input a list of path names of
files to copy into the destination directory.
The options are:
a Reset access times of input files after they have been copied.
B Input/output is to be blocked 5,120 bytes to the record (does
not apply to the pass option; meaningful only with data directed
to or from
d Directories are to be created as needed.
c Write header information in ASCII character form for portabil-
ity.
r Interactively rename files. An empty name (newline only) causes
a file to be skipped.
t Print a table of contents of the input. No files are created.
u Copy unconditionally (normally an older file will not overwrite
a newer file).
v (Verbose) List file names; -vt looks like ls -l.
l Whenever possible, link files rather than copying them. Usable
only with the -p option.
m Retain previous file modification time. This option is ineffec-
tive on directories that are being copied.
f Copy in all files except those in patterns.
s Swap bytes. Use only with the -i option.
S Swap halfwords. Use only with the -i option.
b Swap both bytes and halfwords. Use only with the -i option.
6 Process an old (i.e., UNIX Sixth Edition format) file. Only
useful with -i (copy in).
EXAMPLES
ls | cpio -oc >/dev/mt1
Copy the contents of the current directory to a tape.
mkdir newdir
cd olddir
find . -print | cpio -pd ../newdir
Reproduce a directory hierarchy; newdir must exist.
SEE ALSO
ar(1), bundle(1), tar(1), find(1), cpio(5), cp(1)
BUGS
Path names are restricted to 128 characters.
Does not know about symbolic links.
If there are too many unique linked files, linking information is lost.
Only the super-user can copy special files.
The archive size is reported in archaic `blocks' of 512 bytes.
CPIO(1)