HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
c
cpio(1) cpio(1)
cd olddir
find . -depth -print | cpio -pd
newdir
The trivial case
find . -depth -print | cpio -oB >/dev/rtape/tape4QIC150
can be handled more efficiently by:
find . -cpio /dev/rtape/tape4QIC150
WARNINGS
Because of industry standards and interoperability goals,
cpio does not support the archival of files larger
than 2 GB or files that have user/group IDs greater than 60 K. Files with user/group IDs greater than 60 K
are archived and restored under the user/group ID of the current process.
Do not redirect the output of
cpio to a named
cpio archive file residing in the same directory as the ori-
ginal files belonging to that
cpio
archive. This can cause loss of data.
cpio strips any leading ./ characters in the list of file names piped to it.
Path names are restricted to PATH_MAX characters (see <limits.h> and limits(5)). If there are too
many unique linked files, the program runs out of memory to keep track of them. Thereafter, linking infor-
mation is lost. Only users with appropriate privileges can copy special files.
cpio tapes written on HP machines with the -ox[c] options can sometimes mislead (non-HP) versions of
cpio that do not support the x option. If a non-HP (or non-AT&T) version of
cpio happens to be
modified so that the (HP)
cpio recognizes it as a device special file, a spurious device file might be created.
If /dev/tty is not accessible, cpio issues a complaint and exits.
The -pd option does not create the directory typed on the command line.
The -idr option does not make empty directories.
The -plu option does not link files to existing files.
POSIX defines a file named TRAILER!!! as an end-of-archive marker. Consequently, if a file of that
name is contained in a group of files being written by cpio -o, the file is interpreted as end-of-archive,
and no remaining files are copied. The recommended practice is to avoid naming files anything that resem-
bles an end-of-archive file name.
To create a POSIX-conforming
cpio archive, the c option must be used. To read a POSIX-conforming
cpio archive, the c option must be used and the b, s, S, and
6 options should not be used. If the user
does not have appropriate privileges, the
U option must also be used to get POSIX-conforming behavior
when reading an archive. Users with appropriate privileges should not use this option to get POSIX-
conforming behavior.
DEPENDENCIES
If the path given to cpio contains a symbolic link as the last element, this link is traversed and path name
resolution continues. cpio uses the symbolic link’s target, rather than that of the link.
SEE ALSO
ar(1), find(1), tar(1), mksf(1M), cpio(4), acl(5), environ(5), lang(5), regexp(5), mt(7).
STANDARDS CONFORMANCE
cpio: SVID2, SVID3, XPG2, XPG3
164 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: February 2007