1 .\" Copyright (c) 1991 Free Software Foundation
2 .\" See section COPYING for conditions for redistribution
3 .TH ar 1 "5 November 1991" "cygnus support" "GNU Development Tools"
11 ar\(em\&create, modify, and extract from archives.
16 .BR ar " [\|" "-" "\|]"\c
31 \& program creates, modifies, and extracts from
34 \& is a single file holding a collection of
35 other files in a structure that makes it possible to retrieve
36 the original individual files (called \c
40 The original files' contents, mode (permissions), timestamp, owner, and
41 group are preserved in the archive, and may be reconstituted on
46 \& can maintain archives whose members have names of any
47 length; however, depending on how \c
49 \& is configured on your
50 system, a limit on member-name length may be imposed (for compatibility
51 with archive formats maintained with other tools). If it exists, the
52 limit is often 15 characters (typical of formats related to a.out) or 16
53 characters (typical of formats related to coff).
57 \& is considered a binary utility because archives of this sort
58 are most often used as \c
60 \& holding commonly needed
65 \& will create an index to the symbols defined in relocatable
66 object modules in the archive when you specify the modifier `\|\c
69 Once created, this index is updated in the archive whenever \c
72 makes a change to its contents (save for the `\|\c
74 \|' update operation).
75 An archive with such an index speeds up linking to the library, and
76 allows routines in the library to call each other without regard to
77 their placement in the archive.
83 \|' to list this index
84 table. If an archive lacks the table, another form of \c
89 \& can be used to add just the table.
93 \& insists on at least two arguments to execute: one
94 keyletter specifying the \c
96 \& (optionally accompanied by other
97 keyletters specifying \c
99 \&), and the archive name to act on.
101 Most operations can also accept further \c
104 specifying particular files to operate on.
109 \& allows you to mix the operation code \c
114 \& in any order, within the first command-line argument.
116 If you wish, you may begin the first command-line argument with a
121 \& keyletter specifies what operation to execute; it may be
122 any of the following, but you must specify only one of them:
128 \& modules from the archive. Specify the names of modules to
131 \&; the archive is untouched if you
132 specify no files to delete.
134 If you specify the `\|\c
138 \& will list each module
143 Use this operation to \c
145 \& members in an archive.
147 The ordering of members in an archive can make a difference in how
148 programs are linked using the library, if a symbol is defined in more
151 If no modifiers are used with \c
153 \&, any members you name in the
156 \& arguments are moved to the \c
159 you can use the `\|\c
165 \|' modifiers to move them to a
166 specified place instead.
172 \& the specified members of the archive, to the standard
173 output file. If the `\|\c
175 \|' modifier is specified, show the member
176 name before copying its contents to standard output.
180 \&, all the files in the archive are printed.
191 without checking for replacement.
202 operation; new members are always placed at the end of the archive.
208 \& list each file as it is appended.
210 Since the point of this operation is speed, the archive's symbol table
211 index is not updated, even if it already existed; you can use `\|\c
216 \& explicitly to update the symbol table index.
227 operation differs from `\|\c
229 \|' in that any previously existing members
230 are deleted if their names match those being added.
232 If one of the files named in \c
237 displays an error message, and leaves undisturbed any existing members
238 of the archive matching that name.
240 By default, new members are added at the end of the file; but you may
241 use one of the modifiers `\|\c
248 placement relative to some existing member.
252 \|' used with this operation elicits a line of
253 output for each file inserted, along with one of the letters `\|\c
258 \|' to indicate whether the file was appended (no old member
259 deleted) or replaced.
265 \& listing the contents of \c
268 of the files listed in \c
270 \& that are present in the
271 archive. Normally only the member name is shown; if you also want to
272 see the modes (permissions), timestamp, owner, group, and size, you can
273 request that by also specifying the `\|\c
277 If you do not specify any \c
279 \&, all files in the archive
282 If there is more than one file with the same name (say, `\|\c
285 an archive (say `\|\c
289 \|' will list only the
290 first instance; to see them all, you must ask for a complete
291 listing\(em\&in our example, `\|\c
301 \&) from the archive. You can
304 \|' modifier with this operation, to request that
307 \& list each name as it extracts it.
309 If you do not specify any \c
311 \&, all files in the archive
316 A number of modifiers (\c
318 \&) may immediately follow the \c
321 keyletter, to specify variations on an operation's behavior:
327 \& an existing member of the
328 archive. If you use the modifier \c
330 \&, the name of an existing archive
331 member must be present as the \c
333 \& argument, before the
342 \& an existing member of the
343 archive. If you use the modifier \c
345 \&, the name of an existing archive
346 member must be present as the \c
348 \& argument, before the
351 \& specification. (same as `\|\c
359 \& the archive. The specified \c
362 created if it didn't exist, when you request an update. But a warning is
363 issued unless you specify in advance that you expect to create it, by
370 \& an existing member of the
371 archive. If you use the modifier \c
373 \&, the name of an existing archive
374 member must be present as the \c
376 \& argument, before the
379 \& specification. (same as `\|\c
385 This modifier is accepted but not used.
391 \& dates of members when extracting them. If
392 you do not specify this modifier, files extracted from the archive
393 will be stamped with the time of extraction.
397 Write an object-file index into the archive, or update an existing one,
398 even if no other change is made to the archive. You may use this modifier
399 flag either with any operation, or alone. Running `\|\c
402 archive is equivalent to running `\|\c
410 \&.\|.\|. inserts all files
411 listed into the archive. If you would like to insert \c
414 of the files you list that are newer than existing members of the same
415 names, use this modifier. The `\|\c
417 \|' modifier is allowed only for the
420 \|' (replace). In particular, the combination `\|\c
423 not allowed, since checking the timestamps would lose any speed
424 advantage from the operation `\|\c
430 This modifier requests the \c
432 \& version of an operation. Many
433 operations display additional information, such as filenames processed,
434 when the modifier `\|\c
441 .RB "`\|" binutils "\|'"
447 The GNU Binary Utilities\c
448 , Roland H. Pesch (October 1991).
455 Copyright (c) 1991 Free Software Foundation, Inc.
457 Permission is granted to make and distribute verbatim copies of
458 this manual provided the copyright notice and this permission notice
459 are preserved on all copies.
461 Permission is granted to copy and distribute modified versions of this
462 manual under the conditions for verbatim copying, provided that the
463 entire resulting derived work is distributed under the terms of a
464 permission notice identical to this one.
466 Permission is granted to copy and distribute translations of this
467 manual into another language, under the above conditions for modified
468 versions, except that this permission notice may be included in
469 translations approved by the Free Software Foundation instead of in
470 the original English.