Linux Commands Examples

A great documentation place for Linux commands

cpio

copy files to and from archives

Synopsis

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] [--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


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
find . | cpio -H newc -o > ../cst_initramfs.cpio
0
source
            
rpm2cpio file.rpm | cpio -div
0
source
            
( ls ../src/*.* | cpio -o > testfile.cpio && \
../src/peek testfile.cpio && \
rm -f testfile.cpio ) >/dev/null 2>&1 || exit 1
0
source
            
gunzip < $1 | cpio -i --make-directories
0
source

Copy file in GNU/Linux with progress bar and rate limiting

I suggest you check this out: http://bash.cyberciti.biz/guide/A_progress_bar_%28gauge_box%29#File_Copy_Progress_Bar_With_Dialog

It looks rather neat! =)

description

GNU cpio is fully documented in the texinfo documentation. To access the help from your command line, type

info cpio

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

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

reporting bugs

Report cpio bugs to bug-cpio[:at:]gnu[:dot:]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/>


see also

cpio

How can this site be more helpful to YOU ?


give  feedback