Copy-out mode (cpio)

### 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:

`-0`
`--null`

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

`-A`
`--append`

  Append to an existing archive.

`-a`
`--reset-access-time`

  Reset the access times of files after reading them.

`--absolute-filenames`

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

`--no-absolute-filenames`

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

`--block-size=block-size`

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

`-B`

  Set the I/O block size to 5120 bytes.

`-c`

  Identical to "-H newc", use the new (SVR4) portable format. If you wish the old portable (ASCII) archive format, use "-H odc" instead.

`-C number`
`--io-size=number`

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

`-D dir`
`--directory=dir`

  Change to directory dir

`--force-local`

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

`-F [[user@]host:]archive-file`
`-O [[user@]host:]archive-file`
`--file=[[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`
`--format=format`

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

`-L`
`--dereference`

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

`-M string`
`--message=string`

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

`--quiet`

  Do not print the number of blocks copied.

`--rsh-command=command`

  Use command instead of `rsh` to access remote archives.

`-R`
`--owner=[user][:.][group]`

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

`-v`
`--verbose`

  Verbosely list the files processed.

`-V`
`--dot`

  Print a ‘`.`’ for each file processed.

`-W`
`--warning=flag`

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