CPIO Archive MIME Type
application/x-cpio means, how to identify and extract CPIO archives, and how Poly handles .cpio files. MIME type details for application/x-cpio
In active use| MIME type | application/x-cpio |
|---|---|
| Extensions | .cpio |
| First standardized | 1977 |
| Created by | Dick Haight, AT&T Unix Support Group |
| Browser support | No native browser support |
| Example applications | GNU cpio, bsdcpio, bsdtar |
| Poly support | Partial. Poly recognizes .cpio as application/x-cpio and stores, syncs, shares, and versions the archive, but does not extract it. |
| Indexed by Poly | Partial. Poly indexes the CPIO archive's filename and ordinary file properties, but not member names, metadata, or contents. |
| Preview in Poly | No. Poly has no in-app CPIO archive browser or extractor; download the file and open it with a compatible utility. |
| Poly agent | No. The Poly agent cannot read or reason about files packed inside a CPIO archive. |
What does application/x-cpio mean?
The application/x-cpio media type identifies a CPIO archive, usually stored with the .cpio extension. CPIO collects files, directories, symbolic links, device nodes, and their Unix-style metadata into one sequential byte stream.1
The label is conventional rather than formally registered. application/x-cpio does not appear in IANA's application media-type registry. Its x- prefix reflects the historical practice of naming unregistered types, even though current registration procedures discourage creating new x- subtypes.2
.cpio.gz or an initramfs image with no .cpio suffix at all.3Where did CPIO come from?
Dick Haight wrote the original cpio utility while working in AT&T's Unix Support Group. It appeared in 1977 with PWB/UNIX 1.0, a Programmer's Workbench system derived from Sixth Edition Unix. The name comes from its two main operations: copy in and copy out.1
CPIO later acquired several header formats. Its portable character format was included in IEEE Std 1003.1-1988, but the cpio utility eventually left POSIX and the Single UNIX Specification. The portable ASCII interchange format remains specified through the pax utility.1
The format is still relevant in Linux boot systems. Linux initramfs uses the newc or crc CPIO layouts, optionally wrapped in Gzip, XZ, zstd, or another kernel-supported compression format.3
How do you identify a CPIO archive?
There is no single byte signature shared by every CPIO variant. This page therefore does not present one universal magic number in its details card.
Common headers begin like this:14
| Variant | Header value | Opening bytes in hexadecimal |
|---|---|---|
Portable ASCII, also called odc | 070707 | 30 37 30 37 30 37 |
SVR4 newc | 070701 | 30 37 30 37 30 31 |
SVR4 crc | 070702 | 30 37 30 37 30 32 |
| Binary CPIO | Octal 070707 as a 16-bit integer | Byte order varies |
Each member has a header, pathname, and optional file data. A special member named TRAILER!!! marks the logical end of an archive.1 A detector should parse the selected layout and validate its field sizes instead of relying only on six bytes or a .cpio filename.
The crc name is misleading. Its check field is a simple 32-bit sum of member data bytes, not a cyclic redundancy check. It can catch some accidental damage but should not be treated as cryptographic integrity protection.13
What differs between CPIO variants?
CPIO is a family of related layouts rather than one frozen format. The variants mainly differ in how header numbers are encoded and which ranges they can represent.1
| Format name | Numeric encoding | Practical note |
|---|---|---|
bin | Binary integers | Historical and byte-order sensitive |
odc | Fixed-width ASCII octal | Portable older interchange layout |
newc | Fixed-width ASCII hexadecimal | Common for Linux initramfs |
crc | newc layout plus a byte-sum field | The checksum is weak despite the name |
GNU cpio can read binary, old ASCII, new ASCII, CRC, HP-UX variants, and several TAR layouts. It automatically recognizes the input format when extracting.5 That flexibility is useful for old media, but it also means the outer MIME type does not tell you which CPIO header variant is inside.
Older layouts have important limits. The original PWB format is limited to 16 MB files, the later binary format to 2 GB, and newc to 4 GB. CPIO formats also store numeric user and group IDs rather than names, which can map to different accounts on another machine.1
How do you open an application/x-cpio file?
Web browsers do not include a native CPIO member browser. They generally download the response so an archive utility can handle it.
GNU cpio and libarchive's bsdcpio can list or extract CPIO archives. Libarchive's bsdtar also reads and writes the format.56 List an unfamiliar archive before extracting it:
cpio -itv -F package.cpio
Then create an empty destination directory, change into it, and extract without accepting absolute paths:
mkdir unpacked
cd unpacked
cpio -idmv --no-absolute-filenames -F ../package.cpio
GNU cpio can auto-detect the input layout, but creating an archive should use an explicit format when interoperability matters. For a Linux initramfs, the kernel documentation specifies newc or crc rather than GNU cpio's historical binary default.35
gzip -dc image.cpio.gz | cpio -itv to list a Gzip-wrapped stream without first saving an uncompressed copy.Support in Poly
Poly recognizes .cpio filenames as application/x-cpio and classifies them as archives. It can store, sync, share, version, download, and find the outer file by name.
Poly treats the archive payload as opaque:
- It does not list or extract members.
- It does not index archived pathnames, metadata, or file contents.
- It does not generate a thumbnail or provide an in-app archive preview.
- The Poly agent cannot inspect files packed inside the archive.
Compressed combinations are another limitation. Poly's filename map recognizes the final .cpio extension, but it does not define .cpio.gz as a compound CPIO type. Download and unpack the archive with a trusted utility when you need its members. Uploading the extracted files individually lets each one enter Poly's processing pipeline for its own format.
Is CPIO the same as TAR?
No. Both are sequential Unix archive families, but their header layouts and tooling differ. Renaming backup.cpio to backup.tar does not convert it.
| Property | CPIO | TAR |
|---|---|---|
| Common extension | .cpio | .tar |
| Typical creation input | List of pathnames on standard input | Path operands or a file list |
| Header family | Binary, odc, newc, crc, and variants | V7, ustar, pax, and implementation extensions |
| Built-in compression | No | No |
| Current niche | Linux initramfs, legacy Unix media, embedded systems | General Unix file exchange and backups |
For a new general-purpose Unix archive, TAR with pax extensions is usually the more interoperable choice. Use CPIO when an existing system explicitly requires it, especially a Linux early-userspace workflow.
Security and interoperability considerations
A CPIO archive can describe absolute paths, parent-directory components, symbolic links, hard links, device nodes, ownership, permissions, and executable files. Extraction can therefore overwrite files or create surprising filesystem objects if the tool and privileges allow it. GNU cpio provides --no-absolute-filenames to strip leading filesystem prefixes.5
List the members first, extract into a new directory as an unprivileged user, and inspect the result before moving anything into a trusted location. Avoid restoring device nodes or owner IDs unless that behavior is required and you understand the destination system.
The archive itself does not provide strong authentication. A plausible header or a matching checksum does not establish who created the file. Use a separately authenticated digest or signature when provenance matters.
Converting CPIO to TAR or ZIP is an extract-and-repack operation. It may lose device nodes, hard-link relationships, numeric ownership, permissions, or other Unix metadata that the destination format or chosen tool cannot represent. Keep the original when it belongs to a boot image, firmware package, or reproducible build input.
Footnotes
- FreeBSD Project. cpio(5): Format of CPIO Archive Files. The manual documents the stream structure, variants, limits, POSIX status, history, and weak
crcchecksum. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 - Internet Assigned Numbers Authority. Media Types Registry. The application registry does not list
application/x-cpio. ↩ - Linux Kernel documentation. initramfs Buffer Format. The specification defines Linux initramfs as
newcorcrcCPIO archives with optional compression. ↩ ↩2 ↩3 ↩4 - The Open Group. file Utility. The POSIX rationale gives detection entries for binary and ASCII CPIO magic values. ↩
- GNU Project. GNU CPIO Manual. The manual documents supported formats, automatic input detection, creation and extraction modes, and pathname handling. ↩ ↩2 ↩3 ↩4
- Libarchive Project. libarchive. The project documents CPIO support and its
bsdcpioandbsdtarcommand-line tools. ↩