summaryrefslogtreecommitdiff
path: root/archivers/libarchive/files/doc/text/cpio.5.txt
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/libarchive/files/doc/text/cpio.5.txt')
-rw-r--r--archivers/libarchive/files/doc/text/cpio.5.txt144
1 files changed, 72 insertions, 72 deletions
diff --git a/archivers/libarchive/files/doc/text/cpio.5.txt b/archivers/libarchive/files/doc/text/cpio.5.txt
index f4802cf2584..395a560aa76 100644
--- a/archivers/libarchive/files/doc/text/cpio.5.txt
+++ b/archivers/libarchive/files/doc/text/cpio.5.txt
@@ -1,7 +1,7 @@
-CPIO(5) NetBSD File Formats Manual CPIO(5)
+CPIO(5) BSD File Formats Manual CPIO(5)
NAME
- cpio -- format of cpio archive files
+ cpio — format of cpio archive files
DESCRIPTION
The cpio archive format collects any number of files, directories, and
@@ -11,13 +11,13 @@ DESCRIPTION
General Format
Each file system object in a cpio archive comprises a header record with
basic numeric metadata followed by the full pathname of the entry and the
- file data. The header record stores a series of integer values that gen-
+ file data. The header record stores a series of integer values that gen‐
erally follow the fields in struct stat. (See stat(2) for details.) The
variants differ primarily in how they store those integers (binary,
octal, or hexadecimal). The header is followed by the pathname of the
entry (the length of the pathname is stored in the header) and any file
data. The end of the archive is indicated by a special record with the
- pathname ``TRAILER!!!''.
+ pathname “TRAILER!!!”.
PWB format
XXX Any documentation of the original PWB/UNIX 1.0 format? XXX
@@ -43,7 +43,7 @@ DESCRIPTION
The unsigned short fields here are 16-bit integer values; the unsigned
int fields are 32-bit integer values. The fields are as follows
- magic The integer value octal 070707. This value can be used to deter-
+ magic The integer value octal 070707. This value can be used to deter‐
mine whether this archive is written with little-endian or big-
endian integers.
@@ -69,7 +69,7 @@ DESCRIPTION
0001000 Sticky bit. On some systems, this modifies the behavior
of executables and/or directories.
0000777 The lower 9 bits specify read/write/execute permissions
- for world, group, and user following standard POSIX con-
+ for world, group, and user following standard POSIX con‐
ventions.
uid, gid
@@ -79,7 +79,7 @@ DESCRIPTION
value of at least two here. Note that hardlinked files include
file data with every copy in the archive.
- rdev For block special and character special entries, this field con-
+ rdev For block special and character special entries, this field con‐
tains the associated device number. For all other entry types,
it should be set to zero by writers and ignored by readers.
@@ -98,7 +98,7 @@ DESCRIPTION
to four gigabyte file sizes. See mtime above for a description
of the storage of four-byte integers.
- The pathname immediately follows the fixed header. If the namesize is
+ The pathname immediately follows the fixed header. If the namesize is
odd, an additional NUL byte is added after the pathname. The file data
is then appended, padded with NUL bytes to an even length.
@@ -106,28 +106,28 @@ DESCRIPTION
are included with each copy of the file.
Portable ASCII Format
- Version 2 of the Single UNIX Specification (``SUSv2'') standardized an
+ Version 2 of the Single UNIX Specification (“SUSv2”) standardized an
ASCII variant that is portable across all platforms. It is commonly
- known as the ``old character'' format or as the ``odc'' format. It
- stores the same numeric fields as the old binary format, but represents
- them as 6-character or 11-character octal values.
+ known as the “old character” format or as the “odc” format. It stores
+ the same numeric fields as the old binary format, but represents them as
+ 6-character or 11-character octal values.
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];
+ 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];
};
The fields are identical to those in the old binary format. The name and
- file body follow the fixed header. Unlike the old binary format, there
+ file body follow the fixed header. Unlike the old binary format, there
is no additional padding after the pathname or file contents. If the
files being archived are themselves entirely ASCII, then the resulting
archive will be entirely ASCII, except for the NUL byte that terminates
@@ -135,48 +135,48 @@ DESCRIPTION
New ASCII Format
The "new" ASCII format uses 8-byte hexadecimal fields for all numbers and
- separates device numbers into separate fields for major and minor num-
+ separates device numbers into separate fields for major and minor num‐
bers.
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];
+ 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];
};
Except as specified below, the fields here match those specified for the
old binary format above.
- magic The string ``070701''.
+ magic The string “070701”.
- check This field is always set to zero by writers and ignored by read-
+ check This field is always set to zero by writers and ignored by read‐
ers. See the next section for more details.
The pathname is followed by NUL bytes so that the total size of the fixed
header plus pathname is a multiple of four. Likewise, the file data is
padded to a multiple of four bytes. Note that this format supports only
- 4 gigabyte files (unlike the older ASCII format, which supports 8 giga-
+ 4 gigabyte files (unlike the older ASCII format, which supports 8 giga‐
byte files).
In this format, hardlinked files are handled by setting the filesize to
zero for each entry except the last one that appears in the archive.
New CRC Format
- The CRC format is identical to the new ASCII format described in the pre-
- vious section except that the magic field is set to ``070702'' and the
+ The CRC format is identical to the new ASCII format described in the pre‐
+ vious section except that the magic field is set to “070702” and the
check field is set to the sum of all bytes in the file data. This sum is
- computed treating all bytes as unsigned values and using unsigned arith-
+ computed treating all bytes as unsigned values and using unsigned arith‐
metic. Only the least-significant 32 bits of the sum are stored.
HP variants
@@ -185,25 +185,46 @@ DESCRIPTION
Other Extensions and Variants
Sun Solaris uses additional file types to store extended file data,
- including ACLs and extended attributes, as special entries in cpio ar-
+ including ACLs and extended attributes, as special entries in cpio ar‐
chives.
XXX Others? XXX
+SEE ALSO
+ cpio(1), tar(5)
+
+STANDARDS
+ The cpio utility is no longer a part of POSIX or the Single Unix Stan‐
+ dard. It last appeared in Version 2 of the Single UNIX Specification
+ (“SUSv2”). It has been supplanted in subsequent standards by pax(1).
+ The portable ASCII format is currently part of the specification for the
+ pax(1) utility.
+
+HISTORY
+ The original cpio utility was written by Dick Haight while working in
+ AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0,
+ the “Programmer's Work Bench” derived from Version 6 AT&T UNIX that was
+ used internally at AT&T. Both the old binary and old character formats
+ were in use by 1980, according to the System III source released by SCO
+ under their “Ancient Unix” license. The character format was adopted as
+ part of 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
- The ``CRC'' format is mis-named, as it uses a simple checksum and not a
+ The “CRC” format is mis-named, as it uses a simple checksum and not a
cyclic redundancy check.
The old binary format is limited to 16 bits for user id, group id,
- device, and inode numbers. It is limited to 4 gigabyte file sizes.
+ device, and inode numbers. It is limited to 4 gigabyte file sizes.
The old ASCII format is limited to 18 bits for the user id, group id,
- device, and inode numbers. It is limited to 8 gigabyte file sizes.
+ device, and inode numbers. It is limited to 8 gigabyte file sizes.
The new ASCII format is limited to 4 gigabyte file sizes.
None of the cpio formats store user or group names, which are essential
- when moving files between systems with dissimilar user or group number-
+ when moving files between systems with dissimilar user or group number‐
ing.
Especially when writing older cpio variants, it may be necessary to map
@@ -211,25 +232,4 @@ BUGS
fields. With very large filesystems, this may be necessary even for the
newer formats.
-SEE ALSO
- cpio(1), tar(5)
-
-STANDARDS
- The cpio utility is no longer a part of POSIX or the Single Unix Stan-
- dard. It last appeared in Version 2 of the Single UNIX Specification
- (``SUSv2''). It has been supplanted in subsequent standards by pax(1).
- The portable ASCII format is currently part of the specification for the
- pax(1) utility.
-
-HISTORY
- The original cpio utility was written by Dick Haight while working in
- AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0,
- the ``Programmer's Work Bench'' derived from Version 6 AT&T UNIX that was
- used internally at AT&T. Both the old binary and old character formats
- were in use by 1980, according to the System III source released by SCO
- under their ``Ancient Unix'' license. The character format was adopted
- as part of 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
-
-NetBSD 5.0 October 5, 2007 NetBSD 5.0
+BSD December 23, 2011 BSD