diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 16:49:47 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 16:49:47 +0300 |
commit | b41b9034225ab3e49980d9de55c141011b6383b0 (patch) | |
tree | 891014b4c2e803e01ac7a1fd2b60819fbc5a6e73 /sys/man/1/ar | |
parent | c558a99e0be506a9abdf677f0ca4490644e05fc1 (diff) |
Import sources from 2011-03-30 iso image - sys/man
Diffstat (limited to 'sys/man/1/ar')
-rwxr-xr-x | sys/man/1/ar | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/sys/man/1/ar b/sys/man/1/ar new file mode 100755 index 000000000..4e2e91b48 --- /dev/null +++ b/sys/man/1/ar @@ -0,0 +1,182 @@ +.TH AR 1 +.SH NAME +ar \- archive and library 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 create and update library files for the loaders +.IR 2l (1), +etc. +It can be used, though, for any similar purpose. +.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. +.TP +.B l +Local. +Normally +.I ar +places its temporary files in the directory +.BR /tmp . +This option causes them to be placed in the local directory. +.PP +When a +.BR d , +.BR r , +or +.BR m +.I key +is specified and all members of the archive are valid object files for +the same architecture, +.I ar +inserts a table of contents, required by the loaders, at +the front of the library. +The table of contents is +rebuilt whenever the archive is modified, except +when the +.B q +.I key +is specified or when the table of contents is +explicitly moved or deleted. +.SH EXAMPLE +.TP +.L +ar cr lib.a *.v +Replace the contents of library +.L lib.a +with 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 BUGS +If the same file is mentioned twice in an argument list, +it may be put in the archive twice. +.br +This command predates Plan 9 and makes some invalid assumptions, +for instance that user id's are numeric. |