什么是CPIO?Unix复制进、复制出归档格式解析
一种经典的Unix归档格式,将文件与其元数据一起流式传输。
最后更新:
What is it?
cpio, short for 'copy in, copy out', is a Unix utility and the associated archive format used to combine many files into a single stream. It originated in PWB/UNIX and was later standardized in the POSIX.1 specification.
The cpio program reads a list of file names from standard input and writes a concatenation of file headers, metadata, and contents to an archive. Several header variants exist, including the old binary, old ASCII (odc), and the SVR4 'new ASCII' (newc) formats, the last of which is widely used in Linux initramfs images and RPM payloads.
Technical Specifications
Pros & Cons
Advantages
Stores ownership, permissions, timestamps, and device information, making it suitable for full system archiving.
Operates on a stream of files from standard input, which pipes cleanly with find and other Unix tools.
The format is described in POSIX.1, giving it a stable, well-documented specification.
Used as the payload container inside RPM packages and Linux initramfs images.
Disadvantages
cpio archives are uncompressed and must be paired with gzip or xz to reduce size.
Multiple incompatible header variants can cause confusion and portability issues.
Its command-line interface is considered less intuitive than tar for everyday use.
When to Use It
cpio is most often encountered in system-level archiving and Linux packaging.
RPM包有效载荷
RPM packages store their installable files in a cpio archive, typically compressed with gzip or xz.
Linux initramfs
The initial RAM filesystem loaded by the Linux kernel is packaged as a cpio archive.
系统备份
Combined with find, cpio can archive directory trees while preserving file metadata.
如何打开CPIO文件
处理CPIO文件的软件可以分为专业应用程序、免费/开源工具、基于浏览器的解决方案和内置实用程序。专业应用程序通常为高级用户提供广泛的功能,而免费/开源工具则适合那些寻找经济实惠解决方案的用户。基于浏览器的选项提供了便利性和可访问性,而内置实用程序通常在类Unix系统上可用,以便快速访问。
在选择专门用于CPIO的软件时,功能保真度、是否需要编辑或仅查看功能以及成本模型等因素至关重要。平台兼容性也很重要,因为某些工具可能仅在特定操作系统上可用。此外,考虑导出需求以及将CPIO转换为其他格式是否是您工作流程的更好解决方案。
cpio 2023
cpio是一个用于类Unix系统的命令行工具,处理CPIO归档。它允许用户以高保真度创建、提取和列出CPIO文件的内容。这个工具特别适合习惯于终端命令的用户。
- 从文件创建CPIO归档
- 从CPIO归档中提取文件
- 列出CPIO归档的内容
- 支持各种CPIO格式
- 与其他Unix命令集成
- 在类Unix系统上原生支持
- 批处理效率高
- 无需额外安装
- 命令行界面可能让初学者感到畏惧
- 图形用户界面选项有限
可导出为: 不适用
适合: 如果您更喜欢强大的命令行工具来管理类Unix系统上的CPIO文件,请选择cpio。
访问 cpio →Ark 21.12.3
Ark是一个用于Linux的图形归档管理器,支持多种归档格式,包括CPIO。它提供了一个用户友好的界面,用于查看和提取CPIO归档中的文件,使其对喜欢GUI应用程序的用户更易于访问。
- 用于归档管理的图形界面
- 从CPIO归档中提取文件
- 查看CPIO文件的内容
- 支持多种归档格式
- 与文件管理器集成
- 用户友好的图形界面
- 支持多种归档格式
- 与桌面环境的轻松集成
- 对CPIO文件的编辑能力有限
- 主要设计用于提取,而非创建
可导出为: 不适用
适合: 如果您需要一个用户友好的GUI工具来提取和查看Linux上的CPIO文件,请选择Ark。
访问 Ark →The Unarchiver 4.3.0
The Unarchiver是一个为macOS设计的应用程序,旨在处理多种归档格式,包括CPIO。它允许用户通过简单的拖放界面轻松提取CPIO归档中的文件,迎合喜欢简单提取过程的用户。
- 拖放提取CPIO文件
- 支持多种归档格式
- 与Finder的轻松集成
- 自动文件关联
- 快速提取过程
- 对macOS用户非常易于使用
- 支持广泛的格式
- 无需复杂的设置
- 超出提取的功能有限
- 不支持创建CPIO归档
可导出为: 不适用
适合: 如果您想要一个简单有效的工具来提取macOS上的CPIO文件,请使用The Unarchiver。
访问 The Unarchiver →7-Zip 22.01
7-Zip是一个流行的开源文件归档工具,支持多种归档格式,包括CPIO。它提供图形界面和命令行选项,使用户能够轻松灵活地提取和创建CPIO文件。
- 创建和提取CPIO归档
- 支持多种归档格式
- 高压缩比
- 提供命令行界面
- 与Windows资源管理器集成
- 支持多种归档格式的多功能性
- 强大的压缩能力
- 可在多个平台上使用
- 界面可能显得过时
- 对不熟悉归档的用户来说复杂
可导出为: ZIP, TAR, GZ, BZ2, XZ
适合: 如果您需要一个多功能的归档工具来处理CPIO文件以及许多其他格式,请选择7-Zip。
访问 7-Zip →Convert CPIO Files Free
Use our free online archive converter to convert CPIO and other formats - no signup, no watermarks.
Try Archive Converter Free