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