CPIO(5) File Formats Manual CPIO(5) (NAME) cpio - cpio (DESCRIPTION) cpio ( ) . (General Format) cpio . struct stat . ( stat(2) .) ( ) . ( ) . "TRAILER!!!" . PWB (PWB format) PWB cpio cpio Programmer's Work Bench ( ) . . : struct header_pwb_cpio { short h_magic; short h_dev; short h_ino; short h_mode; short h_uid; short h_gid; short h_nlink; short h_majmin; long h_mtime; short h_namesize; long h_filesize; }; short long . PWB UNIX PDP-11 PDP ( PDP-endian) short - long - . long 0x12345678 0x34 0x12 0x78 0x56 . : h_magic 070707. h_dev, h_ino inode . cpio . cpio . h_mode cpio mode inode . IALLOC ( inode ) ILARG ( inode ) . : 0100000 IALLOC - cpio . 0060000 . 0040000 . 0020000 . 0060000 . 0010000 ILARG - cpio . 0004000 SUID. 0002000 SGID. 0001000 (Sticky bit). 0000777 // (world) POSIX . h_uid, h_gid . h_nlink . . . h_majmin . . h_mtime (Epoch) 00:00:00 UTC . h_namesize . NUL . h_filesize . PWB UNIX . . h_namesize NUL . NUL . . (New Binary Format) cpio cpio . PWB : . . . IALLOC ILARG . : 0170000 . 0140000 . 0120000 . . 0100000 . 0060000 . 0040000 . 0020000 . 0010000 FIFO. 0004000 SUID. 0002000 SGID. 0001000 (Sticky bit). 0000777 // (world) POSIX . . . PWB . bsdcpio -itv : PWB `d' `s' mode `'? . (Portable ASCII Format) Version 2 of the Single UNIX Specification ("SUSv2") . " " "odc" . . struct cpio_odc_header { char c_magic[6]; char c_dev[6]; char c_ino[6]; char c_mode[6]; char c_uid[6]; char c_gid[6]; char c_nlink[6]; char c_rdev[6]; char c_mtime[11]; char c_namesize[6]; char c_filesize[11]; }; . . (padding) . NUL . (New ASCII Format) "" . struct cpio_newc_header { char c_magic[6]; char c_ino[8]; char c_mode[8]; char c_uid[8]; char c_gid[8]; char c_nlink[8]; char c_mtime[8]; char c_filesize[8]; char c_devmajor[8]; char c_devminor[8]; char c_rdevmajor[8]; char c_rdevminor[8]; char c_namesize[8]; char c_check[8]; }; . magic "070701". check . . NUL . . ( ). filesize . CRC (New CRC Format) CRC magic "070702" check . . . HP (HP variants) cpio HPUX XXXX XXX. (Other Extensions and Variants) Sun Solaris (ACL) cpio . XXX Others? XXX (SEE ALSO) cpio(1), tar(5) (STANDARDS) cpio POSIX Single Unix Standard . Version 2 of the Single UNIX Specification ("SUSv2") . pax(1) . pax(1) . (HISTORY) cpio (Dick Haight) AT&T . PWB/UNIX 1.0 "Programmer's Work Bench" Version 6 AT&T UNIX AT&T . System III SCO "Ancient Unix" . IEEE Std 1003.1-1988 ("POSIX.1") . XXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX (BUGS) "CRC" (cyclic redundancy check). inode . . inode . . . cpio . cpio /inode . . Linux 6.12.107+deb13-amd64 December 23, 2011 Linux 6.12.107+deb13-amd64