unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 cpio(4)							     cpio(4)




 NAME
      cpio - format of cpio archive

 DESCRIPTION
      The header structure, when the -c option of cpio is not used (see
      cpio(1)), is:

	   struct {
	       short   c_magic,
		       c_dev;
	       ushort  c_ino,
		       c_mode,
		       c_uid,
		       c_gid;
	       short   c_nlink,
		       c_rdev,
		       c_mtime[2],
		       c_namesize,
		       c_filesize[2];
	       char    c_name[c_namesize rounded to word];
	   } Hdr;

      When the cpio -c option is used, the header information is described
      by:

	   sscanf(Chdr,"%6ho%6ho%6ho%6ho%6ho%6ho%6ho%6ho%11lo%6ho%11lo",
		     &&amp&amp&Hdr.c_magic,&&amp&amp&Hdr.c_dev,&&amp&amp&Hdr.c_ino,&&amp&amp&Hdr.c_mode,
		     &&amp&amp&Hdr.c_uid,&&amp&amp&Hdr.c_gid,&&amp&amp&Hdr.c_nlink,&&amp&amp&Hdr.c_rdev,
		     &&amp&amp&Longtime,&&amp&amp&Hdr.c_namesize,&&amp&amp&Longfile);

      Longtime and Longfile are equivalent to Hdr.c_mtime and
      Hdr.c_filesize, respectively.  The contents of each file are recorded
      together with other items describing the file.  Every instance of
      c_magic contains the constant 070707 (octal).  The items c_dev through
      c_mtime have meanings explained in stat(2).  The length of the null-
      terminated path name c_name, including the null byte, is given by
      c_namesize.

      The last record of the archive always contains the name TRAILER!!!.
      Directories and the trailer are recorded with c_filesize equal to
      zero.

      It will not always be the case that c_dev and c_ino correspond to the
      results of stat(), but the values are always sufficient to tell
      whether two files in the archive are linked to each other.

      When a device special file is archived by HP-UX cpio (using the -x
      option), c_rdev contains a magic constant which is dependent upon the
      implementation doing the writing.	 H_rdev flags the device file as an
      HP-UX 32-bit device specifier, and c_filesize contains the 32-bit
      device specifier (see stat(2)).  If the -x option is not present,



 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 cpio(4)							     cpio(4)




      special files are not archived or restored.  Non-HPUX device special
      files are never restored.

 SEE ALSO
      cpio(1), find(1), stat(2).

 STANDARDS CONFORMANCE
      cpio: XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1














































 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000