maintains groups of files
combined into a single archive file,
The main use of
is to produce and manipulate UNIX archive files, for instance to create
program packages for Debian Linux.
Note that only
can manage archives used as object file libraries by the Inferno and Plan 9 loaders.
is one character from the set
optionally concatenated with
one or more of
are constituents of the archive
The meanings of the
from the archive file.
in the archive file, or add them if missing.
Optional modifiers are
Replace only files with
modified dates later than that of
Place new files after
in the archive rather than at the end.
b or i
Place new files before
in the archive.
to the end of the archive without checking for duplicates.
Avoids quadratic behavior in
for (i in *.v) ar r lib.a $i.
List a table of contents of the archive.
If names are given, only those files are listed.
Print the named files in the archive.
Move the named files to the end or elsewhere,
specified as with
Preserve the access and modification times of files
extracted with the
Extract the named files.
If no names are given, all files in the archive are
In neither case does
alter the archive file.
Give a file-by-file
description of the making of a
new archive file from the old archive and the constituent files.
precede each file with a name.
give a long listing of all information about the files,
somewhat like a listing by
mode uid/gid size date name
will create a new archive when
does not exist, and give a warning.
discards any old contents and suppresses the warning.
ar cr arch.a manifest *.tar.gz
Replace the contents of
file and all the
files in the current directory.
If the same file is mentioned twice in an argument list,
it may be put in the archive twice.
The file format used by this command is taken from UNIX, and
makes some invalid assumptions,
for instance that user IDs are numeric.