
cpp | 97
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-O file
Archive the output to file, which may be a file on another
machine (see -F).
--only-verify-crc
For a CRC-format archive, verify the CRC of each file; don’t
actually copy the files in.
--quiet
Don’t print the number of blocks copied.
-r Rename files interactively.
-R [user][:group], --owner [user][:group]
Reassign file ownership and group information to the user’s
login ID (privileged users only).
-s, --swap-bytes
Swap bytes of each two-byte half-word.
-S, --swap-half-words
Swap half-words of each four-byte word.
--sparse
For copy-out and copy-pass, write files that have large blocks
of zeros as sparse files.
-t, --list
Print a table of contents of the input (create no files). When
used with the -v option, resembles output of ls -l.
-u, --unconditional
Unconditional copy; old files can overwrite new ones.
-v, --verbose
Print a list of filenames processed.
-V, --dot
Print a dot for each file read or written (this shows cpio at
work without cluttering the screen).
--version
Print version number and then exit.
Examples
Generate a list of files whose names end in .old using find; use the
list as input to cpio:
find . -name "*.old" | cpio -ocBv > /dev/rst8
Restore from a tape drive all files whose names contain save (subdi-
rectories are created if needed):
cpio -icdv "*save*" < /dev/rst8 ...