开源归档工具-cpio
2013-05-28 11:34:19 阿炯

cpio 是UNIX操作系统的一个文件备份程序及文件格式。这款工具最初出现于PWB/UNIX,系用于备份磁带,后来也被引进到UNIX System III及System V,并流行开来。

GNU cpio copies files into or out of a cpio or tar archive. The archive can be another file on the disk, a magnetic tape, or a pipe.

GNU cpio supports the following archive formats: binary, old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. The tar format is provided for compatability with the tar program. By default, cpio creates binary format archives, for compatibility with older cpio programs. When extracting from archives, cpio automatically recognizes which kind of archive it is reading and can read archives created on machines with a different byte-order.

cpio 可以从 cpio 或 tar 格式的归档包中存入和读取文件,归档包是一种包含其他文件和有关信息的文件。有关信息包括:文件名、属主、时标(timestamp)和访问权限。归档包可以是磁盘上的其它文件,也可以是磁带或管道。更多的详细用法可参考《cpio命令详细用法》。

使用以下命令可以用当前目录下的所有文件来创建新的 cpio 归档文件:
find . -depth -print | cpio -o >/path/archive.cpio

最新版本:2.11


项目主页:http://www.gnu.org/software/cpio/