1caf54c4fSMartin Matuska.\" Copyright (c) 2007 Tim Kientzle 2caf54c4fSMartin Matuska.\" All rights reserved. 3caf54c4fSMartin Matuska.\" 4caf54c4fSMartin Matuska.\" Redistribution and use in source and binary forms, with or without 5caf54c4fSMartin Matuska.\" modification, are permitted provided that the following conditions 6caf54c4fSMartin Matuska.\" are met: 7caf54c4fSMartin Matuska.\" 1. Redistributions of source code must retain the above copyright 8caf54c4fSMartin Matuska.\" notice, this list of conditions and the following disclaimer. 9caf54c4fSMartin Matuska.\" 2. Redistributions in binary form must reproduce the above copyright 10caf54c4fSMartin Matuska.\" notice, this list of conditions and the following disclaimer in the 11caf54c4fSMartin Matuska.\" documentation and/or other materials provided with the distribution. 12caf54c4fSMartin Matuska.\" 13caf54c4fSMartin Matuska.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14caf54c4fSMartin Matuska.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15caf54c4fSMartin Matuska.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16caf54c4fSMartin Matuska.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17caf54c4fSMartin Matuska.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18caf54c4fSMartin Matuska.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19caf54c4fSMartin Matuska.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20caf54c4fSMartin Matuska.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21caf54c4fSMartin Matuska.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22caf54c4fSMartin Matuska.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23caf54c4fSMartin Matuska.\" SUCH DAMAGE. 24caf54c4fSMartin Matuska.\" 25fd082e96SMartin Matuska.Dd December 23, 2011 26caf54c4fSMartin Matuska.Dt CPIO 5 27caf54c4fSMartin Matuska.Os 28caf54c4fSMartin Matuska.Sh NAME 29caf54c4fSMartin Matuska.Nm cpio 30caf54c4fSMartin Matuska.Nd format of cpio archive files 31caf54c4fSMartin Matuska.Sh DESCRIPTION 32caf54c4fSMartin MatuskaThe 33caf54c4fSMartin Matuska.Nm 34caf54c4fSMartin Matuskaarchive format collects any number of files, directories, and other 35caf54c4fSMartin Matuskafile system objects (symbolic links, device nodes, etc.) into a single 36caf54c4fSMartin Matuskastream of bytes. 37caf54c4fSMartin Matuska.Ss General Format 38caf54c4fSMartin MatuskaEach file system object in a 39caf54c4fSMartin Matuska.Nm 40caf54c4fSMartin Matuskaarchive comprises a header record with basic numeric metadata 41caf54c4fSMartin Matuskafollowed by the full pathname of the entry and the file data. 42caf54c4fSMartin MatuskaThe header record stores a series of integer values that generally 43caf54c4fSMartin Matuskafollow the fields in 44caf54c4fSMartin Matuska.Va struct stat . 45caf54c4fSMartin Matuska(See 46caf54c4fSMartin Matuska.Xr stat 2 47caf54c4fSMartin Matuskafor details.) 48caf54c4fSMartin MatuskaThe variants differ primarily in how they store those integers 49caf54c4fSMartin Matuska(binary, octal, or hexadecimal). 50caf54c4fSMartin MatuskaThe header is followed by the pathname of the 51caf54c4fSMartin Matuskaentry (the length of the pathname is stored in the header) 52caf54c4fSMartin Matuskaand any file data. 53caf54c4fSMartin MatuskaThe end of the archive is indicated by a special record with 54caf54c4fSMartin Matuskathe pathname 55caf54c4fSMartin Matuska.Dq TRAILER!!! . 56caf54c4fSMartin Matuska.Ss PWB format 57ddce862aSMartin MatuskaThe PWB binary 58caf54c4fSMartin Matuska.Nm 59ddce862aSMartin Matuskaformat is the original format, when cpio was introduced as part of the 60ddce862aSMartin MatuskaProgrammer's Work Bench system, a variant of 6th Edition UNIX. It 61ddce862aSMartin Matuskastores numbers as 2-byte and 4-byte binary values. 62caf54c4fSMartin MatuskaEach entry begins with a header in the following format: 63ddce862aSMartin Matuska.Pp 64caf54c4fSMartin Matuska.Bd -literal -offset indent 65ddce862aSMartin Matuskastruct header_pwb_cpio { 66ddce862aSMartin Matuska short h_magic; 67ddce862aSMartin Matuska short h_dev; 68ddce862aSMartin Matuska short h_ino; 69ddce862aSMartin Matuska short h_mode; 70ddce862aSMartin Matuska short h_uid; 71ddce862aSMartin Matuska short h_gid; 72ddce862aSMartin Matuska short h_nlink; 73ddce862aSMartin Matuska short h_majmin; 74ddce862aSMartin Matuska long h_mtime; 75ddce862aSMartin Matuska short h_namesize; 76ddce862aSMartin Matuska long h_filesize; 77caf54c4fSMartin Matuska}; 78caf54c4fSMartin Matuska.Ed 79caf54c4fSMartin Matuska.Pp 80caf54c4fSMartin MatuskaThe 81ddce862aSMartin Matuska.Va short 82ddce862aSMartin Matuskafields here are 16-bit integer values, while the 83ddce862aSMartin Matuska.Va long 84ddce862aSMartin Matuskafields are 32 bit integers. Since PWB UNIX, like the 6th Edition UNIX 85ddce862aSMartin Matuskait was based on, only ran on PDP-11 computers, they 86ddce862aSMartin Matuskaare in PDP-endian format, which has little-endian shorts, and 87ddce862aSMartin Matuskabig-endian longs. That is, the long integer whose hexadecimal 88ddce862aSMartin Matuskarepresentation is 0x12345678 would be stored in four successive bytes 89ddce862aSMartin Matuskaas 0x34, 0x12, 0x78, 0x56. 90ddce862aSMartin MatuskaThe fields are as follows: 91caf54c4fSMartin Matuska.Bl -tag -width indent 92ddce862aSMartin Matuska.It Va h_magic 93caf54c4fSMartin MatuskaThe integer value octal 070707. 94ddce862aSMartin Matuska.It Va h_dev , Va h_ino 95caf54c4fSMartin MatuskaThe device and inode numbers from the disk. 96caf54c4fSMartin MatuskaThese are used by programs that read 97caf54c4fSMartin Matuska.Nm 98caf54c4fSMartin Matuskaarchives to determine when two entries refer to the same file. 99caf54c4fSMartin MatuskaPrograms that synthesize 100caf54c4fSMartin Matuska.Nm 101caf54c4fSMartin Matuskaarchives should be careful to set these to distinct values for each entry. 102ddce862aSMartin Matuska.It Va h_mode 103ddce862aSMartin MatuskaThe mode specifies both the regular permissions and the file type, and 104ddce862aSMartin Matuskait also holds a couple of bits that are irrelevant to the cpio format, 105ddce862aSMartin Matuskabecause the field is actually a raw copy of the mode field in the inode 106ddce862aSMartin Matuskarepresenting the file. These are the IALLOC flag, which shows that 107ddce862aSMartin Matuskathe inode entry is in use, and the ILARG flag, which shows that the 108ddce862aSMartin Matuskafile it represents is large enough to have indirect blocks pointers in 109ddce862aSMartin Matuskathe inode. 110ddce862aSMartin MatuskaThe mode is decoded as follows: 111ddce862aSMartin Matuska.Pp 112ddce862aSMartin Matuska.Bl -tag -width "MMMMMMM" -compact 113ddce862aSMartin Matuska.It 0100000 114ddce862aSMartin MatuskaIALLOC flag - irrelevant to cpio. 115ddce862aSMartin Matuska.It 0060000 116ddce862aSMartin MatuskaThis masks the file type bits. 117ddce862aSMartin Matuska.It 0040000 118ddce862aSMartin MatuskaFile type value for directories. 119ddce862aSMartin Matuska.It 0020000 120ddce862aSMartin MatuskaFile type value for character special devices. 121ddce862aSMartin Matuska.It 0060000 122ddce862aSMartin MatuskaFile type value for block special devices. 123ddce862aSMartin Matuska.It 0010000 124ddce862aSMartin MatuskaILARG flag - irrelevant to cpio. 125ddce862aSMartin Matuska.It 0004000 126ddce862aSMartin MatuskaSUID bit. 127ddce862aSMartin Matuska.It 0002000 128ddce862aSMartin MatuskaSGID bit. 129ddce862aSMartin Matuska.It 0001000 130ddce862aSMartin MatuskaSticky bit. 131ddce862aSMartin Matuska.It 0000777 132ddce862aSMartin MatuskaThe lower 9 bits specify read/write/execute permissions 133ddce862aSMartin Matuskafor world, group, and user following standard POSIX conventions. 134ddce862aSMartin Matuska.El 135ddce862aSMartin Matuska.It Va h_uid , Va h_gid 136ddce862aSMartin MatuskaThe numeric user id and group id of the owner. 137ddce862aSMartin Matuska.It Va h_nlink 138ddce862aSMartin MatuskaThe number of links to this file. 139ddce862aSMartin MatuskaDirectories always have a value of at least two here. 140ddce862aSMartin MatuskaNote that hardlinked files include file data with every copy in the archive. 141ddce862aSMartin Matuska.It Va h_majmin 142ddce862aSMartin MatuskaFor block special and character special entries, 143ddce862aSMartin Matuskathis field contains the associated device number, with the major 144ddce862aSMartin Matuskanumber in the high byte, and the minor number in the low byte. 145ddce862aSMartin MatuskaFor all other entry types, it should be set to zero by writers 146ddce862aSMartin Matuskaand ignored by readers. 147ddce862aSMartin Matuska.It Va h_mtime 148ddce862aSMartin MatuskaModification time of the file, indicated as the number 149ddce862aSMartin Matuskaof seconds since the start of the epoch, 150ddce862aSMartin Matuska00:00:00 UTC January 1, 1970. 151ddce862aSMartin Matuska.It Va h_namesize 152ddce862aSMartin MatuskaThe number of bytes in the pathname that follows the header. 153ddce862aSMartin MatuskaThis count includes the trailing NUL byte. 154ddce862aSMartin Matuska.It Va h_filesize 155ddce862aSMartin MatuskaThe size of the file. Note that this archive format is limited to 16 156ddce862aSMartin Matuskamegabyte file sizes, because PWB UNIX, like 6th Edition, only used 157ddce862aSMartin Matuskaan unsigned 24 bit integer for the file size internally. 158ddce862aSMartin Matuska.El 159ddce862aSMartin Matuska.Pp 160ddce862aSMartin MatuskaThe pathname immediately follows the fixed header. 161ddce862aSMartin MatuskaIf 162ddce862aSMartin Matuska.Cm h_namesize 163ddce862aSMartin Matuskais odd, an additional NUL byte is added after the pathname. 164ddce862aSMartin MatuskaThe file data is then appended, again with an additional NUL 165ddce862aSMartin Matuskaappended if needed to get the next header at an even offset. 166ddce862aSMartin Matuska.Pp 167ddce862aSMartin MatuskaHardlinked files are not given special treatment; 168ddce862aSMartin Matuskathe full file contents are included with each copy of the 169ddce862aSMartin Matuskafile. 170ddce862aSMartin Matuska.Ss New Binary Format 171ddce862aSMartin MatuskaThe new binary 172ddce862aSMartin Matuska.Nm 173ddce862aSMartin Matuskaformat showed up when cpio was adopted into late 7th Edition UNIX. 174ddce862aSMartin MatuskaIt is exactly like the PWB binary format, described above, except for 175ddce862aSMartin Matuskathree changes: 176ddce862aSMartin Matuska.Pp 177ddce862aSMartin MatuskaFirst, UNIX now ran on more than one hardware type, so the endianness 178ddce862aSMartin Matuskaof 16 bit integers must be determined by observing the magic number at 179ddce862aSMartin Matuskathe start of the header. The 32 bit integers are still always stored 180ddce862aSMartin Matuskawith the most significant word first, though, so each of those two, in 181ddce862aSMartin Matuskathe struct shown above, was stored as an array of two 16 bit integers, 182ddce862aSMartin Matuskain the traditional order. Those 16 bit integers, like all the others 183ddce862aSMartin Matuskain the struct, were accessed using a macro that byte swapped them if 184ddce862aSMartin Matuskanecessary. 185ddce862aSMartin Matuska.Pp 186ddce862aSMartin MatuskaNext, 7th Edition had more file types to store, and the IALLOC and ILARG 187ddce862aSMartin Matuskaflag bits were re-purposed to accommodate these. The revised use of the 188ddce862aSMartin Matuskavarious bits is as follows: 189ddce862aSMartin Matuska.Pp 190caf54c4fSMartin Matuska.Bl -tag -width "MMMMMMM" -compact 191caf54c4fSMartin Matuska.It 0170000 192caf54c4fSMartin MatuskaThis masks the file type bits. 193caf54c4fSMartin Matuska.It 0140000 194caf54c4fSMartin MatuskaFile type value for sockets. 195caf54c4fSMartin Matuska.It 0120000 196caf54c4fSMartin MatuskaFile type value for symbolic links. 197caf54c4fSMartin MatuskaFor symbolic links, the link body is stored as file data. 198caf54c4fSMartin Matuska.It 0100000 199caf54c4fSMartin MatuskaFile type value for regular files. 200caf54c4fSMartin Matuska.It 0060000 201caf54c4fSMartin MatuskaFile type value for block special devices. 202caf54c4fSMartin Matuska.It 0040000 203caf54c4fSMartin MatuskaFile type value for directories. 204caf54c4fSMartin Matuska.It 0020000 205caf54c4fSMartin MatuskaFile type value for character special devices. 206caf54c4fSMartin Matuska.It 0010000 207caf54c4fSMartin MatuskaFile type value for named pipes or FIFOs. 208caf54c4fSMartin Matuska.It 0004000 209caf54c4fSMartin MatuskaSUID bit. 210caf54c4fSMartin Matuska.It 0002000 211caf54c4fSMartin MatuskaSGID bit. 212caf54c4fSMartin Matuska.It 0001000 213caf54c4fSMartin MatuskaSticky bit. 214caf54c4fSMartin Matuska.It 0000777 215caf54c4fSMartin MatuskaThe lower 9 bits specify read/write/execute permissions 216caf54c4fSMartin Matuskafor world, group, and user following standard POSIX conventions. 217caf54c4fSMartin Matuska.El 218caf54c4fSMartin Matuska.Pp 219ddce862aSMartin MatuskaFinally, the file size field now represents a signed 32 bit integer in 220ddce862aSMartin Matuskathe underlying file system, so the maximum file size has increased to 221ddce862aSMartin Matuska2 gigabytes. 222caf54c4fSMartin Matuska.Pp 223ddce862aSMartin MatuskaNote that there is no obvious way to tell which of the two binary 224ddce862aSMartin Matuskaformats an archive uses, other than to see which one makes more 225ddce862aSMartin Matuskasense. The typical error scenario is that a PWB format archive 226ddce862aSMartin Matuskaunpacked as if it were in the new format will create named sockets 227ddce862aSMartin Matuskainstead of directories, and then fail to unpack files that should 228ddce862aSMartin Matuskago in those directories. Running 229ddce862aSMartin Matuska.Va bsdcpio -itv 230ddce862aSMartin Matuskaon an unknown archive will make it obvious which it is: if it's 231ddce862aSMartin MatuskaPWB format, directories will be listed with an 's' instead of 232ddce862aSMartin Matuskaa 'd' as the first character of the mode string, and the larger 233ddce862aSMartin Matuskafiles will have a '?' in that position. 234caf54c4fSMartin Matuska.Ss Portable ASCII Format 235caf54c4fSMartin Matuska.St -susv2 236caf54c4fSMartin Matuskastandardized an ASCII variant that is portable across all 237caf54c4fSMartin Matuskaplatforms. 238caf54c4fSMartin MatuskaIt is commonly known as the 239caf54c4fSMartin Matuska.Dq old character 240caf54c4fSMartin Matuskaformat or as the 241caf54c4fSMartin Matuska.Dq odc 242caf54c4fSMartin Matuskaformat. 243caf54c4fSMartin MatuskaIt stores the same numeric fields as the old binary format, but 244caf54c4fSMartin Matuskarepresents them as 6-character or 11-character octal values. 245ddce862aSMartin Matuska.Pp 246caf54c4fSMartin Matuska.Bd -literal -offset indent 247caf54c4fSMartin Matuskastruct cpio_odc_header { 248caf54c4fSMartin Matuska char c_magic[6]; 249caf54c4fSMartin Matuska char c_dev[6]; 250caf54c4fSMartin Matuska char c_ino[6]; 251caf54c4fSMartin Matuska char c_mode[6]; 252caf54c4fSMartin Matuska char c_uid[6]; 253caf54c4fSMartin Matuska char c_gid[6]; 254caf54c4fSMartin Matuska char c_nlink[6]; 255caf54c4fSMartin Matuska char c_rdev[6]; 256caf54c4fSMartin Matuska char c_mtime[11]; 257caf54c4fSMartin Matuska char c_namesize[6]; 258caf54c4fSMartin Matuska char c_filesize[11]; 259caf54c4fSMartin Matuska}; 260caf54c4fSMartin Matuska.Ed 261caf54c4fSMartin Matuska.Pp 262ddce862aSMartin MatuskaThe fields are identical to those in the new binary format. 263caf54c4fSMartin MatuskaThe name and file body follow the fixed header. 264ddce862aSMartin MatuskaUnlike the binary formats, there is no additional padding 265caf54c4fSMartin Matuskaafter the pathname or file contents. 266caf54c4fSMartin MatuskaIf the files being archived are themselves entirely ASCII, then 267caf54c4fSMartin Matuskathe resulting archive will be entirely ASCII, except for the 268caf54c4fSMartin MatuskaNUL byte that terminates the name field. 269caf54c4fSMartin Matuska.Ss New ASCII Format 270caf54c4fSMartin MatuskaThe "new" ASCII format uses 8-byte hexadecimal fields for 271caf54c4fSMartin Matuskaall numbers and separates device numbers into separate fields 272caf54c4fSMartin Matuskafor major and minor numbers. 273ddce862aSMartin Matuska.Pp 274caf54c4fSMartin Matuska.Bd -literal -offset indent 275caf54c4fSMartin Matuskastruct cpio_newc_header { 276caf54c4fSMartin Matuska char c_magic[6]; 277caf54c4fSMartin Matuska char c_ino[8]; 278caf54c4fSMartin Matuska char c_mode[8]; 279caf54c4fSMartin Matuska char c_uid[8]; 280caf54c4fSMartin Matuska char c_gid[8]; 281caf54c4fSMartin Matuska char c_nlink[8]; 282caf54c4fSMartin Matuska char c_mtime[8]; 283caf54c4fSMartin Matuska char c_filesize[8]; 284caf54c4fSMartin Matuska char c_devmajor[8]; 285caf54c4fSMartin Matuska char c_devminor[8]; 286caf54c4fSMartin Matuska char c_rdevmajor[8]; 287caf54c4fSMartin Matuska char c_rdevminor[8]; 288caf54c4fSMartin Matuska char c_namesize[8]; 289caf54c4fSMartin Matuska char c_check[8]; 290caf54c4fSMartin Matuska}; 291caf54c4fSMartin Matuska.Ed 292caf54c4fSMartin Matuska.Pp 293caf54c4fSMartin MatuskaExcept as specified below, the fields here match those specified 294ddce862aSMartin Matuskafor the new binary format above. 295caf54c4fSMartin Matuska.Bl -tag -width indent 296caf54c4fSMartin Matuska.It Va magic 297caf54c4fSMartin MatuskaThe string 298caf54c4fSMartin Matuska.Dq 070701 . 299caf54c4fSMartin Matuska.It Va check 300caf54c4fSMartin MatuskaThis field is always set to zero by writers and ignored by readers. 301caf54c4fSMartin MatuskaSee the next section for more details. 302caf54c4fSMartin Matuska.El 303caf54c4fSMartin Matuska.Pp 304caf54c4fSMartin MatuskaThe pathname is followed by NUL bytes so that the total size 305caf54c4fSMartin Matuskaof the fixed header plus pathname is a multiple of four. 306caf54c4fSMartin MatuskaLikewise, the file data is padded to a multiple of four bytes. 307caf54c4fSMartin MatuskaNote that this format supports only 4 gigabyte files (unlike the 308caf54c4fSMartin Matuskaolder ASCII format, which supports 8 gigabyte files). 309caf54c4fSMartin Matuska.Pp 310caf54c4fSMartin MatuskaIn this format, hardlinked files are handled by setting the 311f55be4fcSMartin Matuskafilesize to zero for each entry except the first one that 312caf54c4fSMartin Matuskaappears in the archive. 313caf54c4fSMartin Matuska.Ss New CRC Format 314caf54c4fSMartin MatuskaThe CRC format is identical to the new ASCII format described 315caf54c4fSMartin Matuskain the previous section except that the magic field is set 316caf54c4fSMartin Matuskato 317caf54c4fSMartin Matuska.Dq 070702 318caf54c4fSMartin Matuskaand the 319caf54c4fSMartin Matuska.Va check 320caf54c4fSMartin Matuskafield is set to the sum of all bytes in the file data. 321caf54c4fSMartin MatuskaThis sum is computed treating all bytes as unsigned values 322caf54c4fSMartin Matuskaand using unsigned arithmetic. 323caf54c4fSMartin MatuskaOnly the least-significant 32 bits of the sum are stored. 324caf54c4fSMartin Matuska.Ss HP variants 325caf54c4fSMartin MatuskaThe 326caf54c4fSMartin Matuska.Nm cpio 327caf54c4fSMartin Matuskaimplementation distributed with HPUX used XXXX but stored 328caf54c4fSMartin Matuskadevice numbers differently XXX. 329caf54c4fSMartin Matuska.Ss Other Extensions and Variants 330caf54c4fSMartin MatuskaSun Solaris uses additional file types to store extended file 331caf54c4fSMartin Matuskadata, including ACLs and extended attributes, as special 332caf54c4fSMartin Matuskaentries in cpio archives. 333caf54c4fSMartin Matuska.Pp 334caf54c4fSMartin MatuskaXXX Others? XXX 335caf54c4fSMartin Matuska.Sh SEE ALSO 336caf54c4fSMartin Matuska.Xr cpio 1 , 337caf54c4fSMartin Matuska.Xr tar 5 338caf54c4fSMartin Matuska.Sh STANDARDS 339caf54c4fSMartin MatuskaThe 340caf54c4fSMartin Matuska.Nm cpio 341caf54c4fSMartin Matuskautility is no longer a part of POSIX or the Single Unix Standard. 342caf54c4fSMartin MatuskaIt last appeared in 343caf54c4fSMartin Matuska.St -susv2 . 344caf54c4fSMartin MatuskaIt has been supplanted in subsequent standards by 345caf54c4fSMartin Matuska.Xr pax 1 . 346caf54c4fSMartin MatuskaThe portable ASCII format is currently part of the specification for the 347caf54c4fSMartin Matuska.Xr pax 1 348caf54c4fSMartin Matuskautility. 349caf54c4fSMartin Matuska.Sh HISTORY 350caf54c4fSMartin MatuskaThe original cpio utility was written by Dick Haight 351caf54c4fSMartin Matuskawhile working in AT&T's Unix Support Group. 352caf54c4fSMartin MatuskaIt appeared in 1977 as part of PWB/UNIX 1.0, the 353caf54c4fSMartin Matuska.Dq Programmer's Work Bench 354caf54c4fSMartin Matuskaderived from 355*0c9c2eb3SMartin Matuska.At v6 356caf54c4fSMartin Matuskathat was used internally at AT&T. 357ddce862aSMartin MatuskaBoth the new binary and old character formats were in use 358caf54c4fSMartin Matuskaby 1980, according to the System III source released 359caf54c4fSMartin Matuskaby SCO under their 360caf54c4fSMartin Matuska.Dq Ancient Unix 361caf54c4fSMartin Matuskalicense. 362caf54c4fSMartin MatuskaThe character format was adopted as part of 363caf54c4fSMartin Matuska.St -p1003.1-88 . 364caf54c4fSMartin MatuskaXXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX 365e2f3482bSMartin Matuska.Sh BUGS 366e2f3482bSMartin MatuskaThe 367e2f3482bSMartin Matuska.Dq CRC 368e2f3482bSMartin Matuskaformat is mis-named, as it uses a simple checksum and 369e2f3482bSMartin Matuskanot a cyclic redundancy check. 370e2f3482bSMartin Matuska.Pp 371ddce862aSMartin MatuskaThe binary formats are limited to 16 bits for user id, group id, 372ddce862aSMartin Matuskadevice, and inode numbers. They are limited to 16 megabyte and 2 373ddce862aSMartin Matuskagigabyte file sizes for the older and newer variants, respectively. 374e2f3482bSMartin Matuska.Pp 375e2f3482bSMartin MatuskaThe old ASCII format is limited to 18 bits for 376e2f3482bSMartin Matuskathe user id, group id, device, and inode numbers. 377e2f3482bSMartin MatuskaIt is limited to 8 gigabyte file sizes. 378e2f3482bSMartin Matuska.Pp 379e2f3482bSMartin MatuskaThe new ASCII format is limited to 4 gigabyte file sizes. 380e2f3482bSMartin Matuska.Pp 381e2f3482bSMartin MatuskaNone of the cpio formats store user or group names, 382e2f3482bSMartin Matuskawhich are essential when moving files between systems with 383e2f3482bSMartin Matuskadissimilar user or group numbering. 384e2f3482bSMartin Matuska.Pp 385e2f3482bSMartin MatuskaEspecially when writing older cpio variants, it may be necessary 386e2f3482bSMartin Matuskato map actual device/inode values to synthesized values that 387e2f3482bSMartin Matuskafit the available fields. 388e2f3482bSMartin MatuskaWith very large filesystems, this may be necessary even for 389e2f3482bSMartin Matuskathe newer formats. 390