Research V3 release
[unix-history] / man / man5 / ar.5
CommitLineData
46c6eca3
KT
1.pa 1
2.he 'ARCHIVE (V)'3/15/72'ARCHIVE (V)'
3.ti 0
4NAME archive (library) file format
5.sp
6.ti 0
7DESCRIPTION The
8archive command ar\b\b__ is used to combine several files into
9one.
10Archives are used mainly as libraries to be searched
11by the link-editor ld\b\b__.
12
13A file produced by ar\b\b__
14has a "magic number" at the start,
15followed by the constituent files, each preceded by a file header.
16The magic number is
17177555(8)
18(it was chosen to be unlikely to occur anywhere else).
19The header of each file is 16 bytes long:
20
21.in +5
22.ti -3
230-7
24.br
25file name, null padded on the right
26
27.ti -3
288-11
29.br
30Modification time of the file
31
32.ti -3
3312
34.br
35User ID of file owner
36
37.ti -3
3813
39.br
40file mode
41
42.ti -3
4314-15
44.br
45file size
46
47.in -5
48If the file is an odd number of bytes long, it is padded
49with a null byte, but the size in the header is correct.
50
51Notice there is no provision for empty areas in an archive
52file.
53.sp
54.ti 0
55SEE ALSO ar\b\b__, ld\b\b__