4 Chapter 2. ar
d
Delete modules from the archive. Specify the names of modules to be deleted as member. . . ; the
archive is untouched if you specify no files to delete.
If you specify the v modifier, ar lists each module as it is deleted.
m
Use this operation to move members in an archive.
The ordering of members in an archive can make a difference in how programs are linked using
the library, if a symbol is defined in more than one member.
If no modifiers are used with m, any members you name in the member arguments are moved to
the end of the archive; you can use the a, b, or i modifiers to move them to a specified place
instead.
p
Print the specified members of the archive, to the standard output file. If the v modifier is speci-
fied, show the member name before copying its contents to standard output.
If you specify no member arguments, all the files in the archive are printed.
q
Quick append; Historically, add the files member. . . to the end of archive, without checking
for replacement.
The modifiers a, b, and i do not affect this operation; new members are always placed at the end
of the archive.
The modifier v makes ar list each file as it is appended.
Since the point of this operation is speed, the archive’s symbol table index is not updated, even
if it already existed; you can use ar s or ranlib explicitly to update the symbol table index.
However, too many different systems assume quick append rebuilds the index, so gnu ar imple-
ments q as a synonym for r.
r
Insert the files member. . . into archive (with replacement). This operation differs from q in
that any previously existing members are deleted if their names match those being added.
If one of the files named in member. . . does not exist, ar displays an error message, and leaves
undisturbed any existing members of the archive matching that name.
By default, new members are added at the end of the file; but you may use one of the modifiers
a, b, or i to request placement relative to some existing member.
The modifier v used with this operation elicits a line of output for each file inserted, along with
one of the letters a or r to indicate whether the file was appended (no old member deleted) or
replaced.
t
Display a table listing the contents of archive, or those of the files listed in member. . . that are
present in the archive. Normally only the member name is shown; if you also want to see the
modes (permissions), timestamp, owner, group, and size, you can request that by also specifying
the v modifier.
If you do not specify a member, all files in the archive are listed.
Commentaires sur ces manuels