|
|
1.1 ! root 1: .TH AR 1 ! 2: .CT 1 lib_obj ! 3: .SH NAME ! 4: ar, ranlib \- archive and library maintainer ! 5: .SH SYNOPSIS ! 6: .B ar ! 7: .I key ! 8: [ ! 9: .I posname ! 10: ] ! 11: .I afile ! 12: [ ! 13: .I file ... ! 14: ] ! 15: .PP ! 16: .B ranlib ! 17: .I archive ... ! 18: .SH DESCRIPTION ! 19: .I Ar ! 20: maintains groups of files ! 21: combined into a single archive file, ! 22: .I afile. ! 23: If it is not to be modified, the archive may ! 24: be read from standard input, indicated by the name ! 25: .BR . ! 26: The main use of ! 27: a ! 28: .I ar ! 29: is to create and update library files for the loader ! 30: .IR ld (1). ! 31: It can be used, though, for any similar purpose. ! 32: .PP ! 33: .I Key ! 34: is one character from the set ! 35: .B drqtpmx, ! 36: optionally concatenated with ! 37: one or more of ! 38: .B vuaibcl. ! 39: The ! 40: .I files ! 41: are constituents of the archive ! 42: .I afile. ! 43: The meanings of the ! 44: .I key ! 45: characters are: ! 46: .TP ! 47: .B d ! 48: Delete ! 49: .I files ! 50: from the archive file. ! 51: .TP ! 52: .B r ! 53: Replace ! 54: .I files ! 55: in the archive file. ! 56: Optional modifiers are ! 57: .RS ! 58: .PD0 ! 59: .TP ! 60: .B u ! 61: Only replace files with ! 62: modified dates later than that of ! 63: the archive. ! 64: .TP ! 65: .B a ! 66: Place new files after ! 67: .I posname ! 68: in the archive rather than at the end. ! 69: .TP ! 70: .BR b " or " i ! 71: Place new files before ! 72: .I posname ! 73: in the archive. ! 74: .RE ! 75: .PD ! 76: .TP ! 77: .B q ! 78: Quick. Append ! 79: .I files ! 80: to the end of the archive without checking for duplicates. ! 81: Avoids quadratic behavior in ! 82: .LR "for i in *.o; do ar r lib.a $i; done" . ! 83: .TP ! 84: .B t ! 85: List a table of contents of the archive. ! 86: If names are given, only those files are listed. ! 87: .TP ! 88: .B p ! 89: Print the named files in the archive. ! 90: .TP ! 91: .B m ! 92: Move the named files to the end or elsewhere, ! 93: specified as with ! 94: .LR r . ! 95: .TP ! 96: .B x ! 97: Extract the named files. ! 98: If no names are given, all files in the archive are ! 99: extracted. ! 100: In neither case does ! 101: .B x ! 102: alter the archive file. ! 103: .TP ! 104: .B v ! 105: Verbose. ! 106: Give a file-by-file ! 107: description of the making of a ! 108: new archive file from the old archive and the constituent files. ! 109: With ! 110: .BR p , ! 111: precede each file with a name. ! 112: With ! 113: .B t, ! 114: give a long listing of all information about the files, ! 115: somewhat like a listing by ! 116: .IR ls (1), ! 117: showing ! 118: .br ! 119: .ns ! 120: .IP ! 121: .B ! 122: mode uid/gid size date name ! 123: .TP ! 124: .B c ! 125: Create. ! 126: Normally ! 127: .I ar ! 128: will create a new archive when ! 129: .I afile ! 130: does not exist, and give a warning. ! 131: Option ! 132: .B c ! 133: discards any old contents and suppresses the warning. ! 134: .TP ! 135: .B l ! 136: Local. ! 137: Normally ! 138: .I ar ! 139: places its temporary files in the directory ! 140: .FR /tmp . ! 141: This option causes them to be placed in the local directory. ! 142: .PP ! 143: .I Ranlib ! 144: makes a table-of-contents file ! 145: .F _\^_.SYMDEF ! 146: for each library ! 147: .I archive. ! 148: With this table the loader ! 149: .IR ld (1) ! 150: will extract files as if it were repeatedly invoked ! 151: until no more subroutines can be found. ! 152: .SH EXAMPLES ! 153: .TP ! 154: .L ! 155: ar cr lib.a *.o; ranlib lib.a ! 156: Replace the contents of library ! 157: .L lib.a ! 158: with the object files in the current directory. ! 159: .TP ! 160: .L ! 161: pcat old.a.z | ar t - ! 162: List the contents of an archived and compressed collection of old ! 163: files; see ! 164: .IR pack (1). ! 165: .SH FILES ! 166: .F /tmp/v* ! 167: temporaries ! 168: .SH "SEE ALSO" ! 169: .IR ld (1), ! 170: .IR ar (5) ! 171: .SH BUGS ! 172: If the same file is mentioned twice in an argument list, ! 173: it may be put in the archive twice. ! 174: .br ! 175: .IR Ld (1) ! 176: warnings that a library is newer ! 177: than its table of contents ! 178: happen when a library is copied.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.