May 2013
Beginner to intermediate
384 pages
7h 40m
English
cpio is another archiving format similar to tar. It is used to store files and directories in a file with attributes such as permissions, ownership, and so on. But, it is not commonly used as much as tar. However, cpio is used in RPM package archives (which are used in distros such as Fedora), initramfs files for the Linux kernel which contain the kernel image, and so on. This recipe will give minimal usage examples of cpio.
cpio takes input filenames through stdin and it writes the archive into stdout. We have to redirect stdout to a file to receive the output cpio file as follows:
$ touch file1 file2 file3
$ echo file1 file2 file3 | cpio -ov > archive.cpio ...Read now
Unlock full access