Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ archive(V) — UNIX 6th Edition 1.3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar (I)

ld (I)

ARCHIVE(V)  −  PWB/UNIX 9/10/73

NAME

ar − archive (library) file format

DESCRIPTION

The archive command ar is used to combine several files into one.  Archives are used mainly as libraries to be searched by the link-editor ld.  A file produced by ar has a magic number at the start, followed by the constituent files, each preceded by a file header.  The magic number is 177555(8) (it was chosen to be unlikely to occur anywhere else).  The header of each file is 16 bytes long:

0-7file name, null padded on the right

8-11modification time of the file

12user ID of file owner

13file mode

14-15file size

Each file begins on a word boundary; a null byte is inserted between files if necessary.  Nevertheless the size give reflects the actual size of the file exclusive of padding.  Notice there is no provision for empty areas in an archive file.

SEE ALSO

ar (I), ld (I)

BUGS

Names are only 8 characters, not 14.  More important, there isn’t enough room to store the proper mode, so ar always extracts in mode 666. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026