182 lines · 3.1 KB · Text
RawDownload
.TH AR 1.SH NAMEar \- archive and library 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 create and update library files for the loaders.IR 2l (1),etc.It can be used, though, for any similar purpose..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 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..TP.B lLocal.Normally.I arplaces its temporary files in the directory.BR /tmp .This option causes them to be placed in the local directory..PPWhen a.BR d ,.BR r ,or.BR m.I keyis specified and all members of the archive are valid object files forthe same architecture,.I arinserts a table of contents, required by the loaders, atthe front of the library.The table of contents isrebuilt whenever the archive is modified, exceptwhen the.B q.I keyis specified or when the table of contents isexplicitly moved or deleted..SH EXAMPLE.TP.Lar cr lib.a *.vReplace the contents of library.L lib.awith the object files in the current directory..SH FILES.TF /tmp/vxxxx.TP.B /tmp/v*temporaries.SH SOURCE.B /sys/src/cmd/ar.c.SH "SEE ALSO".IR 2l (1), .IR ar (6).SH BUGSIf the same file is mentioned twice in an argument list,it may be put in the archive twice..brThis command predates Plan 9 and makes some invalid assumptions,for instance that user id's are numeric.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t