1AR(1) General Commands Manual AR(1)
2
3
4
6 ar - archive and library maintainer
7
9 ar key [ posname ] afile name ...
10
12 Ar maintains groups of files combined into a single archive file. Its
13 main use is to create and update library files as used by the loader.
14 It can be used, though, for any similar purpose.
15
16 Key is one character from the set drqtpmx, optionally concatenated with
17 one or more of vuaibcl. Afile is the archive file. The names are con‐
18 stituent files in the archive file. The meanings of the key characters
19 are:
20
21 d Delete the named files from the archive file.
22
23 r Replace the named files in the archive file. If the optional
24 character u is used with r, then only those files with modified
25 dates later than the archive files are replaced. If an optional
26 positioning character from the set abi is used, then the posname
27 argument must be present and specifies that new files are to be
28 placed after (a) or before (b or i) posname. Otherwise new
29 files are placed at the end.
30
31 q Quickly append the named files to the end of the archive file.
32 Optional positioning characters are invalid. The command does
33 not check whether the added members are already in the archive.
34 Useful only to avoid quadratic behavior when creating a large
35 archive piece-by-piece.
36
37 t Print a table of contents of the archive file. If no names are
38 given, all files in the archive are tabled. If names are given,
39 only those files are tabled.
40
41 p Print the named files in the archive.
42
43 m Move the named files to the end of the archive. If a position‐
44 ing character is present, then the posname argument must be
45 present and, as in r, specifies where the files are to be moved.
46
47 x Extract the named files. If no names are given, all files in
48 the archive are extracted. In neither case does x alter the ar‐
49 chive file.
50
51 v Verbose. Under the verbose option, ar gives a file-by-file
52 description of the making of a new archive file from the old ar‐
53 chive and the constituent files. When used with t, it gives a
54 long listing of all information about the files. When used with
55 p, it precedes each file with a name.
56
57 c Create. Normally ar will create afile when it needs to. The
58 create option suppresses the normal message that is produced
59 when afile is created.
60
61 l Local. Normally ar places its temporary files in the directory
62 /tmp. This option causes them to be placed in the local direc‐
63 tory.
64
66 /tmp/v* temporaries
67
69 ld(1), ar(5), lorder(1)
70
72 If the same file is mentioned twice in an argument list, it may be put
73 in the archive twice.
74
75
76
77 AR(1)