Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
cpio(1) OSS Shell and Utilities Reference Manual
NAME
cpio - Copies files to and from archive storage
SYNOPSIS
cpio -o[aBcv]
cpio -i[Bcdfmrtuv][pattern ... ]
cpio -p[adlmuv] directory
FLAGS
The -i, -o, and -p flags are described in the DESCRIPTION section of this reference page.
-a Resets the access times of copied files to the current time. (When the -l flag is
also specified, the access times of the linked files are not reset.)
-B Performs block input/output, 5120 bytes to a record.
-c Writes header information in ASCII character form. Specify this flag when
POSIX compliance is required and when you are creating or restoring archives
for or from another system. Archives written with -c must also be read with -c.
Use this flag to read archives written by pax.
-d Creates directories as needed.
-f Copies all files except those matching pattern (cpio -i only).
-l Links files rather than copying them, whenever possible. This flag can be used
only with cpio -p.
-m Retains previous file modification time. This flag is ineffective when copying
directories.
-r Causes cpio to ask whether you want to rename each file before copying it. If
you do not want to change the filename, enter the current filename or press
only Return. In this last case, cpio does not copy the file.
-t Prints a table of contents of the input. Printing the table of contents does not
copy any files.
-u Copies unconditionally. Otherwise, a file from the archive with the same name
as an existing file in the file system is copied only if the archived file is the
newer one.
-v Lists filenames. If you use this with the -t flag, the output looks similar to that
of the ls -l command.
DESCRIPTION
The cpio command is used to save and restore data from traditional-format cpio archives.
cpio -o (Copy Out)
This command reads file pathnames from the standard input file and copies these files to the stan-
dard output file along with pathnames and status information. Output is padded to a 512-byte
boundary.
2−72 Hewlett-Packard Company 527188-003