Cpio
Cpio
Main page

Cpio

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Cpio

cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. The software utility was originally intended as a tape archiving program as part of the Programmer's Workbench (PWB/UNIX), and has been a component of virtually every Unix operating system released thereafter. Its name is derived from the phrase copy in and out, in close description of the program's use of standard input and standard output in its operation.

All variants of Unix also support other backup and archiving programs, such as tar, which has become more widely recognized. The use of cpio by the RPM Package Manager, in the initramfs of the Linux kernel since version 2.6, and in Apple's Installer (pax) make cpio an important archiving tool.

Since its original design, cpio and its archive file format have undergone several, sometimes incompatible, revisions. Most notable is the change, now an operational option, from the use of a binary format of archive file meta information to an ASCII-based representation.

cpio was removed from POSIX.1-2001 in favor of pax, a similar utility which had been introduced in the previous version of the standard.

cpio appeared in Version 7 Unix as part of the Programmer's Workbench project.

cpio was originally designed to store backup file archives on a tape device in a sequential, contiguous manner. It does not compress any content, but resulting archives are often compressed using gzip or other external compressors.

When creating archives during the copy-out operation, initiated with the -o command line flag, cpio reads file and directory path names from its standard input channel and writes the resulting archive byte stream to its standard output. Cpio is therefore typically used with other utilities that generate the list of files to be archived, such as the find program.

The resulting cpio archive is a sequence of files and directories concatenated into a single archive, separated by header sections with file meta information, such as filename, inode number, ownership, permissions, and timestamps. By convention, the file name of an archive is usually given the file extension cpio.

See all
User Avatar
No comments yet.