Opentopia Directory Encyclopedia Tools

CPIO

Encyclopedia : C : CP : CPI : CPIO


Cpio is both the name of a binary utility, and a form of digital archive. A Cpio archive is essentially a stream of files and directories in a single archive. The archive has header information that allows for an application such as the GNU Cpio tool to extract the files and directories into a file system. The header of a Cpio archive also contains information such as filename, time stamps, owner and permissions.

The Cpio archive is similar in function to that of a tar archive, and was designed to store backups onto a tape device in a contiguous manner.

A cpio archive will often end in a .cpio file extension. A cpio archive can also be compressed using gzip (for example,) at which point the file extension will usually become cpio.gz.

The GNU cpio options are different from those used in FreeBSD.

GNU Cpio Application

The GNU CPIO application is a tool that can be used to put information into a CPIO or tar archive. The Cpio application is free software, and is available from [the GNU web site].

Example Usage

To put files into a CPIO archive using the GNU CPIO tool, you can use the following command.
find MySourceDir -type f  | cpio -pvudm ~/MyDestinationDir
To extract files from a cpio archive, pass the archive to cpio as its standard input.
cpio -id < cpiofile
The -i flag indicates that cpio is reading in the archive to extract files, and the -d flag tells cpio to construct directories as necessary. You can also use the -v flag to have file names listed as files are extracted.

See also

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: