Linux Command Library
commands
Commands
basic
Basic
tips
Tips

cpio

copy files to and from archives

- Take a list of file names from standard input and add them [o]nto an archive in cpio's binary format:
echo "[file1] [file2] [file3]" | cpio -o > [archive.cpio]

- Copy all files and folders in a directory and add them [o]nto an archive, in [v]erbose mode:
find [path/to/directory] | cpio -ov > [archive.cpio]

- P[i]ck all files from an archive, generating [d]irectories where needed, in [v]erbose mode:
cpio -idv < [archive.cpio]

cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] [-O [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--format=format] [--message=message] [--null] [--reset-access-time] [--verbose] [--dot] [--append] [--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet] [--force-local] [--rsh-command=command] [--help] [--version] < name-list [> archive]

cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format] [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--make-directories] [--nonmatching] [--preserve-modification-time] [--numeric-uid-gid] [--rename] [-t|--list] [--swap-bytes] [--swap] [--dot] [--unconditional] [--verbose] [--block-size=blocks] [--swap-halfwords] [--io-size=bytes] [--pattern-file=file] [--format=format] [--owner=[user][:.][group]] [--no-preserve-owner] [--message=message] [--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc] [--to-stdout] [--quiet] [--rsh-command=command] [--extract-over-symlinks] [--help] [--version] [pattern...] [< archive]

cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]] [--null] [--reset-access-time] [--make-directories] [--link] [--quiet] [--preserve-modification-time] [--unconditional] [--verbose] [--dot] [--dereference] [--owner=[user][:.][group]] [--no-preserve-owner] [--sparse] [--help] [--version] destination-directory < name-list

Report cpio bugs to bug-cpio@gnu.org

GNU cpio home page: <http://www.gnu.org/software/cpio/>

General help using GNU software: <http://www.gnu.org/gethelp/>

Report cpio translation bugs to <http://translationproject.org/team/>

cpio(5)

The online copy of the documentation is available at the following address:

http://www.gnu.org/software/cpio/manual

play store download app store download
Imprint
Sonnenallee 29, 12047 Berlin, Germany
e-mail: sschubert89@gmail.com

Privacy policy
Successfully copied