Cpio
From Just Solve the File Format Problem
(Difference between revisions)
m (Add link to initramfs page.) |
|||
(12 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{FormatInfo | {{FormatInfo | ||
+ | |name=cpio | ||
|formattype=electronic | |formattype=electronic | ||
|subcat=Archiving | |subcat=Archiving | ||
|extensions={{ext|cpio}} | |extensions={{ext|cpio}} | ||
|mimetypes={{mimetype|application/x-cpio}} | |mimetypes={{mimetype|application/x-cpio}} | ||
+ | |pronom={{PRONOM|fmt/635}} | ||
}} | }} | ||
− | '''cpio''' is a non-compressed file archive format for [[Unix]]-style systems. It was originally intended for tape archiving, similar to the [[Tape Archive]] (tar) format. | + | {{DISPLAYTITLE:cpio}} |
+ | |||
+ | '''cpio''' is a non-compressed file archive format for [[Unix]]-style systems. It was originally intended for tape archiving, similar to the [[Tape Archive]] (tar) format. | ||
+ | |||
+ | In [[Linux]] cpio archive can readily be found in <code>/boot</code> as filename <code>/boot/[[initramfs]]*.img</code> for kernel versions 2.6 and onwards.<ref>[[wikipedia:cpio|cpio on Wikipedia]]</ref><ref>[https://www.kernel.org/doc/html/latest/driver-api/early-userspace/early_userspace_support.html Early userspace support - kernel documentation]</ref> Alternatively, cpio archives are used as [[RPM]] packages. | ||
== Examples == | == Examples == | ||
Line 12: | Line 18: | ||
To list files: | To list files: | ||
− | $ cpio -it -I | + | $ cpio -it -I example.cpio |
+ | |||
+ | == Identification == | ||
+ | A cpio archive begins with one of the following signatures: | ||
+ | * <code>0x71 0xC7</code> | ||
+ | * <code>0xC7 0x71</code> | ||
+ | * <code>'0' '7' '0' '7'</code> | ||
+ | |||
+ | Be aware that there are [[afio]] extensions to cpio format that are not supported by most cpio utilities. For one thing, if most of the filenames end in ".z", it's probably a compressed afio archive. | ||
== Specifications == | == Specifications == | ||
Line 19: | Line 33: | ||
== Software == | == Software == | ||
* [http://www.gnu.org/software/cpio/cpio.html GNU cpio] | * [http://www.gnu.org/software/cpio/cpio.html GNU cpio] | ||
− | * [http://www.libarchive.org | + | * [http://www.libarchive.org libarchive / bsdcpio] |
* [http://gnuwin32.sourceforge.net/packages/cpio.htm cpio for Windows] | * [http://gnuwin32.sourceforge.net/packages/cpio.htm cpio for Windows] | ||
− | * [http:// | + | * [[7-Zip]] |
+ | * [[afio]] | ||
+ | * [[Konvertor]] | ||
+ | * {{Deark}} | ||
+ | * [[tar#software|star]] | ||
+ | |||
+ | == Sample files == | ||
+ | * http://ftp.gnu.org/gnu/tar/tar-1.27.cpio.gz | ||
+ | * {{DexvertSamples|archive/cpio}} | ||
+ | * [https://www.clamav.net/downloads ClamAV Download] → [https://www.clamav.net/downloads/production/clamav-0.103.8.tar.gz 0.103.8 Source] → test/.split → split.clam.*.cpio?? | ||
== Other links == | == Other links == | ||
Line 28: | Line 51: | ||
* [http://www.gnu.org/software/cpio/manual/index.html GNU cpio manual] | * [http://www.gnu.org/software/cpio/manual/index.html GNU cpio manual] | ||
* [http://rightsock.com/~kjw/Ramblings/tar_v_cpio.html tar vs. cpio] | * [http://rightsock.com/~kjw/Ramblings/tar_v_cpio.html tar vs. cpio] | ||
+ | * [https://web.archive.org/web/20190809160054/http://www.forensicswiki.org/wiki/Cpio ForensicsWiki entry] (no useful detail) | ||
+ | |||
+ | == References == | ||
+ | <references/> |
Latest revision as of 01:25, 12 August 2025
cpio is a non-compressed file archive format for Unix-style systems. It was originally intended for tape archiving, similar to the Tape Archive (tar) format.
In Linux cpio archive can readily be found in /boot
as filename /boot/initramfs*.img
for kernel versions 2.6 and onwards.[1][2] Alternatively, cpio archives are used as RPM packages.
Contents |
[edit] Examples
To extract files, using the command line utility:
$ cpio -idmv -I example.cpio
To list files:
$ cpio -it -I example.cpio
[edit] Identification
A cpio archive begins with one of the following signatures:
-
0x71 0xC7
-
0xC7 0x71
-
'0' '7' '0' '7'
Be aware that there are afio extensions to cpio format that are not supported by most cpio utilities. For one thing, if most of the filenames end in ".z", it's probably a compressed afio archive.
[edit] Specifications
[edit] Software
[edit] Sample files
- http://ftp.gnu.org/gnu/tar/tar-1.27.cpio.gz
- dexvert samples — archive/cpio
- ClamAV Download → 0.103.8 Source → test/.split → split.clam.*.cpio??
[edit] Other links
- Wikipedia article
- cpio utility man page
- GNU cpio manual
- tar vs. cpio
- ForensicsWiki entry (no useful detail)