.TH AR 1.SH NAMEar \- archive maintainer.SH SYNOPSIS.B ar.I key[.I posname].I afile[.I file ...].SH DESCRIPTION.I Armaintains groups of filescombined into a single archive file,.IR afile .The main use of.I aris to produce and manipulate UNIX archive files, for instance to createprogram packages for Debian Linux.Note that only.IR iar (10.1)can manage archives used as object file libraries by the Inferno and Plan 9 loaders..PP.I Keyis one character from the set.BR drqtpmx ,optionally concatenated withone or more of.BR vuaibclo .The.I filesare constituents of the archive.IR afile .The meanings of the.I keycharacters are:.TP.B dDelete .I files from the archive file..TP.B rReplace.I files in the archive file, or add them if missing.Optional modifiers are.RS.PD0.TP.B uReplace only files withmodified dates later than that ofthe archive..TP.B aPlace new files after.I posnamein the archive rather than at the end..TP.BR b " or " iPlace new files before.I posnamein the archive..RE.PD.TP.B qQuick. Append.I files to the end of the archive without checking for duplicates.Avoids quadratic behavior in.LR "for (i in *.v) ar r lib.a $i" ..TP.B tList a table of contents of the archive.If names are given, only those files are listed..TP.B pPrint the named files in the archive..TP.B mMove the named files to the end or elsewhere,specified as with .LR r ..TP.B oPreserve the access and modification times of filesextracted with the.B xcommand..TP.B xExtract the named files.If no names are given, all files in the archive areextracted.In neither case does.B xalter the archive file..TP.B vVerbose.Give a file-by-filedescription of the making of anew archive file from the old archive and the constituent files.With.BR p ,precede each file with a name.With.BR t ,give a long listing of all information about the files,somewhat like a listing by.IR ls (1),showing.br.ns.IP.B mode uid/gid size date name.TP.B cCreate.Normally.I arwill create a new archive when.I afiledoes not exist, and give a warning.Option .B cdiscards any old contents and suppresses the warning..SH EXAMPLE.TP.Lar cr arch.a manifest *.tar.gzReplace the contents of.L arch.awith the.B manifestfile and all the.IR gzip (1)'d.I tarfiles in the current directory..SH FILES.TF /tmp/art.*.*.TP.B /tmp/art.*.*temporaries.SH SOURCE.B /appl/cmd/ar.b.SH "SEE ALSO".IR 2l (10.1),.IR iar (10.1),.IR ar (10.6).SH BUGSIf the same file is mentioned twice in an argument list,it may be put in the archive twice..brThe file format used by this command is taken from UNIX, andmakes some invalid assumptions,for instance that user IDs are numeric.
.TH AR 1
.SH NAME
ar \- archive maintainer
.SH SYNOPSIS
.B ar
.I key
[
.I posname
]
.I afile
[
.I file ...
]
.SH DESCRIPTION
.I Ar
maintains groups of files
combined into a single archive file,
.IR afile .
The main use of
.I ar
is to produce and manipulate UNIX archive files, for instance to create
program packages for Debian Linux.
Note that only
.IR iar (10.1)
can manage archives used as object file libraries by the Inferno and Plan 9 loaders.
.PP
.I Key
is one character from the set
.BR drqtpmx ,
optionally concatenated with
one or more of
.BR vuaibclo .
The
.I files
are constituents of the archive
.IR afile .
The meanings of the
.I key
characters are:
.TP
.B d
Delete
.I files
from the archive file.
.TP
.B r
Replace
.I files
in the archive file, or add them if missing.
Optional modifiers are
.RS
.PD0
.TP
.B u
Replace only files with
modified dates later than that of
the archive.
.TP
.B a
Place new files after
.I posname
in the archive rather than at the end.
.TP
.BR b " or " i
Place new files before
.I posname
in the archive.
.RE
.PD
.TP
.B q
Quick. Append
.I files
to the end of the archive without checking for duplicates.
Avoids quadratic behavior in
.LR "for (i in *.v) ar r lib.a $i" .
.TP
.B t
List a table of contents of the archive.
If names are given, only those files are listed.
.TP
.B p
Print the named files in the archive.
.TP
.B m
Move the named files to the end or elsewhere,
specified as with
.LR r .
.TP
.B o
Preserve the access and modification times of files
extracted with the
.B x
command.
.TP
.B x
Extract the named files.
If no names are given, all files in the archive are
extracted.
In neither case does
.B x
alter the archive file.
.TP
.B v
Verbose.
Give a file-by-file
description of the making of a
new archive file from the old archive and the constituent files.
With
.BR p ,
precede each file with a name.
With
.BR t ,
give a long listing of all information about the files,
somewhat like a listing by
.IR ls (1),
showing
.br
.ns
.IP
.B
mode uid/gid size date name
.TP
.B c
Create.
Normally
.I ar
will create a new archive when
.I afile
does not exist, and give a warning.
Option
.B c
discards any old contents and suppresses the warning.
.SH EXAMPLE
.TP
.L
ar cr arch.a manifest *.tar.gz
Replace the contents of
.L arch.a
with the
.B manifest
file and all the
.IR gzip (1)'d
.I tar
files in the current directory.
.SH FILES
.TF /tmp/art.*.*
.TP
.B /tmp/art.*.*
temporaries
.SH SOURCE
.B /appl/cmd/ar.b
.SH "SEE ALSO"
.IR 2l (10.1),
.IR iar (10.1),
.IR ar (10.6)
.SH BUGS
If the same file is mentioned twice in an argument list,
it may be put in the archive twice.
.br
The file format used by this command is taken from UNIX, and
makes some invalid assumptions,
for instance that user IDs are numeric.