Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ar(5) — UNIX System III

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

arcv(1)

ld(1)

AR(5)  —  UNIX 3.0

NAME

ar − archive 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(1).

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 0177545(octal) (it was chosen to be unlikely to occur anywhere else).  The header of each file is 26 bytes long:

#defineARMAG0177545
structar_hdr {
charar_name[14];
longar_date;
charar_uid;
charar_gid;
intar_mode;
longar_size;
};

Each file begins on a word boundary; a null byte is inserted between files if necessary.  Nevertheless the size given 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(1), arcv(1), ld(1). 

BUGS

The archive header structure is not compatible between the PDP-11 and the VAX-11/780, due to the different word sizes.  See arcv(1) to convert between machines.

May 16, 1980

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