1*33833Sbostic.ll 68 2*33833Sbostic.ce 3*33833SbosticUNIX\(rg 4*33833Sbostic.FS "\&" 5*33833SbosticUNIX is a registered trademark of AT&T 6*33833Sbostic.FE 7*33833SbosticSystem V 8*33833Sbostic.in +5 9*33833SbosticNAME 10*33833Sbostic.br 11*33833Sbostic.in +5 12*33833Sbosticcpio - format of cpio archive 13*33833Sbostic.in -5 14*33833Sbostic.sp 15*33833SbosticDESCRIPTION 16*33833Sbostic.br 17*33833Sbostic.in +5 18*33833SbosticThe header structure, when the -c option of cpio(1) is not used, is: 19*33833Sbostic.sp 20*33833Sbosticstruct { 21*33833Sbostic.TS 22*33833Sbosticcenter; 23*33833Sbosticl l. 24*33833Sbosticshort h_magic, 25*33833Sbostic h_dev; 26*33833Sbosticushort h_ino, 27*33833Sbostic h_mode, 28*33833Sbostic h_uid, 29*33833Sbostic h_gid; 30*33833Sbosticshort h_nlink, 31*33833Sbostic h_rdev, 32*33833Sbostic h_mtime[2], 33*33833Sbostic h_namesize, 34*33833Sbostic h_filesize[2]; 35*33833Sbosticchar h_name[h_namesize rounded to word]; 36*33833Sbostic.TE 37*33833Sbostic} Hdr; 38*33833Sbostic.sp 39*33833Sbostic.in -5 40*33833SbosticWhen the -c option is used, the header information is described by: 41*33833Sbostic.DS 42*33833Sbostic sscanf(Chdr,"%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s", 43*33833Sbostic &Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode, 44*33833Sbostic &Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev, 45*33833Sbostic &Longtime, &Hdr.h_namesize,&Longfile,Hdr.h_name); 46*33833Sbostic.DE 47*33833SbosticLongtime and Longfile are equivalent to Hdr.h_mtime and 48*33833SbosticHdr.h_filesize, respectively. The contents of each file are 49*33833Sbosticrecorded in an element of the array of varying lenght 50*33833Sbosticstructures, archive, together with other items describing 51*33833Sbosticthe file. Every instance of h_magic contains the constant 52*33833Sbostic070707 (octal). The itmes h_dev through h_mtime have 53*33833Sbosticmeanings explained in stat(2). The length of the null- 54*33833Sbosticterminated path name H_name, icluding the null byte, is 55*33833Sbosticgiven by h_namesize. 56*33833Sbostic.sp 57*33833SbosticThe last record of the archive always contains the name 58*33833SbosticTRAILER!!!. Special files, directories, and the trailer are 59*33833Sbosticrecorded with H_filesize equal to zero. 60*33833Sbostic.sp 61*33833Sbostic.in -5 62*33833SbosticSEE ALSO 63*33833Sbostic.br 64*33833Sbostic.in +5 65*33833Sbosticstat(2). 66*33833Sbostic.br 67*33833Sbosticcpio(1), find(1) in the UNIX System User Reference Manual. 68