CPIO File Format (.cpio)
A CPIO file is a Unix archive produced by the cpio utility, storing a sequence of files with their Unix permissions and ownership one after another with no compression of its own.
CPIO at a glance#
| Full name | cpio archive |
|---|---|
| File extension | .cpio |
| Category | Archives |
| Developer | Dick Haight (AT&T Bell Laboratories) |
| First released | 1977 |
| MIME types | application/x-cpio |
| Compression | Uncompressed |
| FileFlip support | FileFlip reads this format but does not write it |
What a .cpio file can hold#
These are the things a CPIO file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.
| Embedded metadata | Yes |
|---|---|
| Streaming | Yes |
Strengths and limitations of CPIO#
What CPIO does well
- Reads its file list from standard input, so it slots into a shell pipeline instead of needing every filename on the command line
- The newc header cpio writes is exactly what the Linux kernel expects when it unpacks an initramfs at boot
- Smaller, simpler per-file header than tar, which is part of why RPM chose it for package payloads
Where CPIO falls short
- No compression of its own, so a plain .cpio file is often larger than the same files tarred and gzipped
- Several incompatible header variants exist (binary, odc, newc, crc), and reading the wrong one fails outright
- Dropped from POSIX.1-2001 in favor of pax, so fewer tools bundle it by default now
Use cpio when building or inspecting an initramfs image or an RPM payload, since both specifically expect a cpio archive rather than tar.
Convert a CPIO archive to tar when the files need to go somewhere that expects the more common format, since tar is understood by nearly every archive tool.
How to open a .cpio file#
A .cpio file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts CPIO into a format your machine already opens, and it does it in the browser tab rather than on a server.
| Platform | Programs that open it |
|---|---|
| Windows | 7-Zip |
| macOS | cpio (command line), Keka |
| Linux | cpio (command line), 7-Zip (p7zip) |
| Web | FileFlip |
CPIO questions people ask#
What is a CPIO file used for today?
A CPIO file is a Unix archive most commonly found in two places today: the initramfs image the Linux kernel unpacks early in boot, and the payload of an RPM package. Outside those two roles it has mostly been replaced by tar.
Why does an initramfs use cpio instead of tar?
Linux's kernel unpacks the initramfs cpio archive itself before any userspace tools are available, and cpio's simpler, more compact header format was easier to support directly in the kernel than tar's. The specific variant used is called newc, an ASCII-header cpio format.
How do I get the files out of an RPM package's cpio payload?
An RPM file's payload is a compressed cpio archive sitting after the package's header, and the standard way to reach it is to pipe rpm2cpio through cpio -idmv, which extracts the files without installing the package.
Converting CPIO files#
Convert CPIO to another format
FileFlip does not write .cpio files, so nothing on the site converts into this format. It works as a source only.
Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.