BSD 3 development
[unix-history] / usr / man / man1 / ar.1
CommitLineData
e6817382
BJ
1.TH AR 1
2.SH NAME
3ar \- archive and library maintainer
4.SH SYNOPSIS
5.B ar
6key [ posname ] afile name ...
7.SH DESCRIPTION
8.I Ar
9maintains groups of files
10combined into a single archive file.
11Its main use
12is to create and update library files as used by the loader.
13It can be used, though, for any similar purpose.
14.PP
15.I Key
16is one character from the set
17.B drqtpmx,
18optionally concatenated with
19one or more of
20.B vuaibcl.
21.I Afile
22is the archive file.
23The
24.I names
25are constituent files in the archive file.
26The meanings of the
27.I key
28characters are:
29.TP
30.B d
31Delete the named files from the archive file.
32.TP
33.B r
34Replace the named files in the archive file.
35If the optional character
36.B u
37is used with
38.B r,
39then only those files with
40modified dates later than
41the archive files are replaced.
42If an optional positioning character from the set
43.B abi
44is used, then the
45.I posname
46argument must be present
47and specifies that new files are to be placed
48after
49.RB ( a )
50or before
51.RB ( b
52or
53.BR i )
54.IR posname .
55Otherwise
56new files are placed at the end.
57.TP
58.B q
59Quickly append the named files to the end of the archive file.
60Optional positioning characters are invalid.
61The command does not check whether the added members
62are already in the archive.
63Useful only to avoid quadratic behavior when creating a large
64archive piece-by-piece.
65.TP
66.B t
67Print a table of contents of the archive file.
68If no names are given, all files in the archive are tabled.
69If names are given, only those files are tabled.
70.TP
71.B p
72Print the named files in the archive.
73.TP
74.B m
75Move the named files to the end of the archive.
76If a positioning character is present,
77then the
78.I posname
79argument must be present and,
80as in
81.B r,
82specifies where the files are to be moved.
83.TP
84.B x
85Extract the named files.
86If no names are given, all files in the archive are
87extracted.
88In neither case does
89.B x
90alter the archive file.
91.TP
92.B v
93Verbose.
94Under the verbose option,
95.I ar
96gives a file-by-file
97description of the making of a
98new archive file from the old archive and the constituent files.
99When used with
100.B t,
101it gives a long listing of all information about the files.
102When used with
103.BR p ,
104it precedes each file with a name.
105.TP
106.B c
107Create.
108Normally
109.I ar
110will create
111.I afile
112when it needs to.
113The create option suppresses the
114normal message that is produced when
115.I afile
116is created.
117.TP
118.B l
119Local.
120Normally
121.I ar
122places its temporary files in the directory /tmp.
123This option causes them to be placed in the local directory.
124.SH FILES
125/tmp/v* temporaries
126.SH "SEE ALSO"
127ld(1), ar(5),
128lorder(1)
129.SH BUGS
130If the same file is mentioned twice in an argument list,
131it may be put in the archive twice.