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