[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Copy-out mode

In copy-out mode, cpio copies files into an archive. It reads a list of filenames, one per line, on the standard input, and writes the archive onto the standard output. A typical way to generate the list of filenames is with the find command; you should give find the ‘-depth’ option to minimize problems with permissions on directories that are unreadable.

Copy-out mode is requested by the ‘-o’ (‘--create’) command line option, e.g.:

% find | cpio -o > directory.cpio

The following options can be used in copy-out mode:


Filenames in the list are delimited by ASCII null characters instead of newlines.


Append to an existing archive.


Reset the access times of files after reading them.


Do not strip file system prefix components from the file names. This is the default.


Strip file system prefix components from the file names before storing them to the archive.


Sets the I/O block size to block-size * 512 bytes.


Set the I/O block size to 5120 bytes.


Use the old portable (ASCII) archive format.

-C number

Set the I/O block size to the given number of bytes.

-D dir

Change to directory dir


Treat the archive file as local, even if its name contains colons.

-F [[user@]host:]archive-file
-O [[user@]host:]archive-file

Use the supplied archive-file instead of standard input. Optional user and host specify the user and host names in case of a remote archive.

-H format

Use given archive format. See format, for a list of available formats.


Dereference symbolic links (copy the files that they point to instead of copying the links).

-M string

Print string when the end of a volume of the backup media is reached.


Do not print the number of blocks copied.


Use command instead of rsh to access remote archives.


Set the ownership of all files created to the specified user and/or group. See owner.


Verbosely list the files processed.


Print a ‘.’ for each file processed.


Control warning display. Argument is one of ‘none’, ‘truncate’, ‘no-truncate’ or ‘all’. See warning, for a detailed discussion of these.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May 1, 2023 using texi2html 5.0.