ar

ar(1)                        GNU Development Tools                       ar(1)



åå
       ar - æ¸åº«ã®ä½æãå¤æ´ãããã³æ¸åº«ããã®ãã¡ã¤ã«ã®ååºããè¡ã


æ¸å¼
       ar [-]{dmpqrtx}[abcilosSuvV] [membername] archive files...


説æ
       GNU arããã°ã©ã ã¯æ¸åº« ( archive )
       ãã¡ã¤ã«ã®ä½æãå¤æ´ãããã³æ¸åº«ããã®ãã¡ã¤ã«ã®ååºããè¡ããæ¸åº«ã¯
       ããã¤ãã®ãã¡ã¤ã«ãéãã¦ä¸ã¤ã®ãã¡ã¤ã«ã«ãããã®ã§ãåé¨ãããªãªã¸
       ãã«ã®ãã¡ã¤ã«ããããã復åãããã¨ãã§ããããã«ãªã£ã¦ãããåé¨ã«å« ã¾ãããã¡ã¤ã«ãæ¸åº«ã®
       ã¡ã³ãã¼ ã¨å¼ã¶ã

       ãªãªã¸ãã«ã®ãã¡ã¤ã«ã®å容ãã¢ã¼ã (許å¯å±æ§)ãã¿ã¤ã ã¹ã¿ã³ãããªã¼ãã¼
       ããã³ã°ã«ã¼ããæ¸åº«ã«ä¿åãããååºãã®éã«åè¨å®ãããã¨ãã§ããã

       GNU ar ã§ã¯ãæ¸åº«ã«å«ã¾ããã¡ã³ãã¼ã®ååã®é·ãã«å¶éã¯ãªãããã ã ar
       ã®ã¤ã³ã¹ãã¼ã«æã®è¨å®ã«ãã£ã¦ã¯ãå¶éãä»ãã¦ããå ´åããããããã㪠ã
       (ä»ã®ãã¼ã«ã§æ±ããæ¸åº«ãã©ã¼ãããã¨ã®äºææ§ã®ããã§ãããã¨ãå¤ã)ã å¶éãããå ´åã«ã¯ã
       15 æå (a.out é¢é£ãã©ã¼ããã) ã¾ã㯠16 æå (coff é¢é£ãã©ã¼ããã) ã§ãããã¨ãå¤ãã

       ar ã¯ãã¤ããªã¼ã¦ã¼ãã£ãªã㣠(binary utility) ã¨ããã¦ããã
       ãªããªããã®ç¨®ã®æ¸åº«ã¯æ±ç¨ã®ãµãã«ã¼ãã³ãã¾ã¨ãã ã©ã¤ãã©ãª
       ã¨ãã¦ç¨ãããããã¨ãå¤ãããã§ããã

       ar ã¯ãæ¸åº«ã«å¥ã£ã¦ãããªãã±ã¼ã¿ãã«ãªãªãã¸ã§ã¯ãã¢ã¸ã¥ã¼ã«ã«å«ã¾ããã·
       ã³ãã«ã®ç´¢å¼ (index) ãä½æãããã¨ãã§ãããããã¯ä¿®æ£å (modifier) `s'
       ãæå®ãããã¨ãã®åä½ã§ãããä¸åº¦ä½æãããã¨ããã®ç´¢å¼ã¯ ar
       ã«ãã£ã¦æ¸åº«ã®å容ãå¤æ´ããããã³ã«æ´æ°ããã (ãã ã `q' ã«ãã£
       ã¦æ¸åº«ãæ´æ°ãããå ´åãé¤ã)ããã®ãããªç´¢å¼ãæã£ãæ¸åº«ã§ã¯ãã©ã¤ã
       ã©ãªã¨ãã¦ãªã³ã¯ãããå ´åã®é度ãåä¸ãããã¾ãã©ã¤ãã©ãªã®åé¨ã«å«ã¾ãã
       ã«ã¼ãã³ããæ¸åº«åé¨ã§ã®ä½ç½®ã«ããããäºããå¼ã³åºããã¨ãã§ããããã« ãªãã

       `nm -s' ã¾ã㯠`nm --print-armap' ã¨ããã°ãã®ç´¢å¼ããª
       ã¹ããããã¨ãã§ãããæ¸åº«ã«ç´¢å¼ããªãå ´åã¯ã ar ã®å¥åã§ãã ranlib
       ãç¨ãã¦ç´¢å¼ã追å ãããã¨ãã§ããã

       ar ã®å®è¡ã«ã¯æä½ 2 ã¤ã®å¼æ°ãå¿è¦ã§ãããä¸ã¤ã¯ ar ã®åä½ (operation)
       ãæå®ããä¸æåã®è±å (åä½æå®å :keyletter) ã§ã ã (ä»ã®è±åãä¿®æ£å‐
       ã¨ãã¦ä»éãããã¨ããã)ãããä¸ã¤ã¯å®éã«æä½ã® 対象ã¨ãªãæ¸åº«ã®ååã§ããã

       ã»ã¨ãã©ã®åä½ã§ã¯åä½å¯¾è±¡ã¨ãããã¡ã¤ã«ã files å¼æ°ã¨ãã¦ä¸ãããã¨ãã§ããã


ãªãã·ã§ã³
       GNU arã§ã¯åä½æå®å p ã¨ä¿®æ£å mod
       ã®é çªã¯ä»»æã§ãããããããã¯ã¾ã¨ãã¦æåã®ã³ãã³ãã©ã¤ã³å¼æ°ã«ä¸ãã å¿è¦ãããã

       æåã®ã³ãã³ãã©ã¤ã³å¼æ°ã®åé ã«ããã·ã¥ (-) ãå ãã¦ããã¾ããªãã

       åä½æå®å p ã§ã¯å®è¡ããåä½ãæå®ãããããã«ã¯ä»¥ä¸ã®ã©ãããæå®ãããè¤æ°æå®ã
       ããã¨ã¯ã§ããªãã


       d      æ¸åº«ããã¢ã¸ã¥ã¼ã«ãåé¤ ( Delete ) ãããåé¤ããã¢ã¸ã¥ã¼ã«ã®åå㯠files
              ã«æå®ãããããä¸ã¤ããã¡ã¤ã«ãæå®ãããªãã£ãå ´åã¯ãæ¸åº«ã«ä½ã®æä½ ãè¡ããªãã

              ä¿®æ£åã¨ã㦠v ãæå®ããã¨ã ar ã¯åé¤ããã¢ã¸ã¥ã¼ã«ããããã表示ããã


       m      æ¸åº«ä¸ã®ã¡ã³ãã¼ã移å ( Move )ããã

              ä¸ã¤ã®ã·ã³ãã«ãæ¸åº«åé¨ã®è¤æ°ã®ã¡ã³ãã¼ã«ãã£ã¦å®ç¾©ããã¦ããå ´åãã¡
              ã³ãã¼ã®éç½®ã®é çªãç°ãªãã¨ããã®ã©ã¤ãã©ãªã¸ã®ãªã³ã¯ã®ããæ¹ãäºæ³ã¨
              ã¯ç°ãªãå¯è½æ§ãããã

              ä¿®æ£åã«ããæå®ããªããã°ã m ã«ããæä½ã§ã¯ files
              å¼æ°ã«ãã£ã¦æå®ãããã¡ã³ãã¼ãæ¸åº«ã®æå¾å°¾ã«ç§»åããã移ååã ä¿®æ£å
              `a'ã `bi ã«ãã£ã¦æå®ãããã¨ãã§ããã


       p      æå®ãããæ¸åº«åé¨ã®ã¡ã³ãã¼ (è¤æ°å¯) ãæ¨æºåºåã«è¡¨ç¤º ( Print ) ããã
              `v' ä¿®æ£åãæå®ãããå ´åã«ã¯ãã¡ã³ãã¼ã®å容ãæ¨æºåº
              åã«è¡¨ç¤ºããåã«ãã®ã¡ã³ãã¼ã®ååã表示ããã

              files ãæå®ããªãã¨ãæ¸åº«ã®åé¨ã®ãã¹ã¦ã®ãã¡ã¤ã«ã表示ãããã


       q      files ãæ¸åº«ã®æå¾ã«è¿½å ããããã®ã¨ãç½®ãæãã®ãã§ãã¯ãè¡ããªã
              (Quickappend

              ä¿®æ£å aãbãi
              ã¯ãã®æä½ã«ã¯å½±é¿ããªããæ°ããã¡ã³ãã¼ã¯å¸¸ã«æ¸åº«ã®æå¾ã«éç½®ãããã

              ä¿®æ£å vãã¤ããã¨ar ã¯è¿½å ããéã«ããããã®ãã¡ã¤ã«ã表示ããã

              ãã®æä½ã®ãã½ã¯é度ãªã®ã§ãæ¸åº«ã®ã·ã³ãã«ãã¼ãã«ã¯æ´æ°ãããªã (åå¨
              ãã¦ãã¦ãæ´æ°ãããªã)ãã·ã³ãã«ãã¼ãã«ãæ示çã«æ´æ°ãããã«ã¯ ar s ã¾ãã¯
              ranlib ãç¨ããã°ããã

              ãããã quick append ã®éã« index ãåæ§ç¯ãããã¨ã¿ãªãã¦ãã
              ã·ã¹ãã ããã¾ãã«ãå¤ãã®ã§ã GNU ar ã®å®è£ã§ã¯ q ã r ã¨å義ã¨ãã¦ããã


       r      æ¸åº«ã« files ãæ¿å¥ããååã®ãã¡ã¤ã«ããã£ããç½®æ ( Replacement )
              ããããã®æä½ã¯ q
              ã¨ã¯ç°ãªãããã¨ããæ¸åº«ã«ãã£ãã¡ã³ãã¼ã®ãã¡è¿½å ããã¡ã³ãã¼ã¨ååã®
              ãã®ã¯ãã¹ã¦åé¤ãããã

              files ã®ãªã¹ãã®ä¸ã«åå¨ããªããã¡ã¤ã«ããã£ãå ´å ar
              ã¯ã¨ã©ã¼ã表示ãããããã¦ãã®ã¡ã³ãã¼ã«é¢ãã¦ã¯å¤ããã®ãæ¸åº«ã«ãã®ã¾
              ã¾æ®ããå¤æ´ãè¡ãªããªãã

              ããã©ã«ãã§ã¯æ°ããªã¡ã³ãã¼ã¯ãã¡ã¤ã«ã®æå¾ã«è¿½å ãããã ä¿®æ£å aã bã i
              ã使ãã°ãç¾å¨åå¨ãã¦ããã¡ã³ãã¼
              ããã®ç¸å¯¾ä½ç½®ã¨ãã¦ãæ°ããªãã¡ã¤ã«ã追å ããä½ç½®ãæå®ãããã¨ãã§ã ãã

              ãã®æä½ã§ä¿®æ£å v
              ãç¨ããã¨ãæ¿å¥ããããã¡ã¤ã«ãä¸è¡ãã¤è¡¨ç¤ºãããã¾ããã®ã¨ã a ã¾ã㯠r ã®æå‐
              ã表示ãããããã¯ãããããã¡ã¤ã«ãè¿½å  (append) ããã
              (ã¤ã¾ãæ¸åº«ã«ã¯åé¤ãã¹ãå¤ãã¡ã³ãã¼ãåå¨ããªãã£ã) ããç½®æ (replace)
              ããããã«å¯¾å¿ããã


       t      æ¸åº«ã®å容ã®è¡¨ ( table ) ã表示ããã files ãæå®ãããå ´åã¯ãfiles
              ã®ãã¡æ¸åº«ã«åå¨ãããã®ã表示ããã
              é常ã¯ã¡ã³ãã¼ã®ååã®ã¿ã表示ããããã¢ã¼ã (ãã¼ããã·ã§ã³)ãã¿ã¤ã
              ã¹ã¿ã³ãããªã¼ãã¼ãã°ã«ã¼ãããµã¤ãºãªã©ã表示ããããå ´åã«ã¯ããªã¯ã¨
              ã¹ãã®éã«åæã«ä¿®æ£å v ãã¤ããã°è¯ãã

              files ãæå®ããªããã°ãæ¸åº«ã«ãããã¹ã¦ã®ãã¡ã¤ã«ããªã¹ããããã

              åãååã®ãã¡ã¤ã« (仮㫠fie ã¨ãã) ãæ¸åº« (b.a ã¨ãã) ã«äºã¤ä»¥ä¸å‐
              å¨ããå ´åã«ã¯ã `ar t b.a fie' ã§ã¯æåã®ãã®ãã表 示ããªãããã¹ã¦ã®
              fie ã表示ããããå ´åã«ã¯ãæ¸åº«ã®ãã¡ã¤ã«å¨ã¦ã表示ãããããã«å®è¡ããªã
              ãã°ãªããªã (ãã®ä¾ãªãã° `ar t b.a' ã¨ãªã)ã



       x      ã¡ã³ãã¼ãæ¸åº«ããåãåºã ( eXtract )ããã®æä½ã«ä¿®æ£å v ãç¨ããã¨ã ar
              ã¯ååºãããã¡ã¤ã«ããããã表示ããã

              files ãä½ãæå®ããªãã¨ãæ¸åº«ã®ãã¹ã¦ã®ãã¡ã¤ã«ãåãåºãããã


       ããã¤ãã®ä¿®æ£å ( mod ) ãåä½æå®å p ã«ç¶ãã¦æå®ãããã¨ãã§ããã
       ããã«ãã£ã¦åä½ã調æ´ãããã¨ãã§ããã


       a      æ°ããªãã¡ã¤ã«ãããã§ã«æ¸åº«ã«åå¨ããã¡ã³ãã¼ã®å¾ ( after )
              ã«è¿½å ãããä¿®æ£å a ãç¨ããå ´åã¯ãæ¸åº«ã«ãã§ã«åå¨ããã¡ã³ãã¼ã®ååãå¼æ°
              membername ã¨ãã¦æ¸åº«åã®æå®ã®åã«ç½®ããªããã°ãªããªãã


       b      æ°ããªãã¡ã¤ã«ãããã§ã«æ¸åº«ã«åå¨ããã¡ã³ãã¼ã®å ( before )
              ã«è¿½å ãããä¿®æ£å b ãç¨ããå ´åã¯ãæ¸åº«ã«ãã§ã«åå¨ããã¡ã³ãã¼ã®ååãå¼æ°
              membername ã¨ãã¦ãæ¸åº«åã®æå®ã®åã«ç½®ããªããã°ãªããªãã ( i
              ã¨åãåä½ããã)


       c      æ¸åº«ãä½æ ( create ) ãããæ¸åº«ãæ´æ°ããæä½ã®å ´åã«ã¯ãæå®ããæ¸åº«ãå‐
              å¨ããªããã°ãã ãã¯å¸¸ã«ä½æããããããããã®ã¨ãè¦åã¡ãã»ã¼ã¸ãåºãããã®ä¿®æ£åãã
              ããããåæã«æå®ãã¦ããã°ããã®è¦åãææ¢ãããã¨ãã§ããã


       f      æ¸åº«ã®ä¸ã®ååãåãã¤ãããé常 ar
              ã§ã¯ããã¡ã¤ã«åã«ã¯ä»»æã®é·ããæå®ã§ãããããããã®ãã¨ã¯ãä»ã®ã·ã¹
              ãã ã®ãã¤ãã£ã㪠ar ãã‐
              ã°ã©ã ã¨äºææ§ã®ãªãæ¸åº«ãä½ã£ã¦ãã¾ãåå ã«ããªããããªããããã
              ããåé¡ã¨ãªãã¨ãã¯ãä¿®æ£å f ãç¨ããã°æ¸åº«ã®ä¸‐
              ã«å¥ãããã¡ã¤ã«ã®ååãåãã¤ãããã¨ãã§ããã


       i      æ°ãããã¡ã¤ã«ãæ¸åº«ã«åå¨ããã¡ã³ãã¼ã®åã«æ¿å¥ (insert) ããããã®ä¿® æ£å
              i ãç¨ããéã«ã¯ãæ¸åº«ã«åå¨ãã¦ããã¡ã³ãã¼ã®ååã membername
              å¼æ°ã¨ãã¦æ¸åº«ã®æå®ã®åã«ç½®ãå¿è¦ãããã ( b ã¨åãåä½ããã)


       l      ãã®ä¿®æ£åã¯ã¨ã©ã¼ã«ã¯ãªããªããä½ã®å¹åããªãã


       o      æ¸åº«ããã¡ã³ãã¼ãåãåºãã¨ãã«ãåã®æ¥ä»ãä¿åãã (original)ã ãã®ä¿®æ£å‐
              ãæå®ããªããã°ã
              æ¸åº«ããåãåºããããã¡ã¤ã«ã®ã¿ã¤ã ã¹ã¿ã³ãã¯åãåºãæã®ãã®ã«ãªãã


       s      ãªãã¸ã§ã¯ããã¡ã¤ã«ã®ç´¢å¼ãæ¸åº«ã«æ¸ãè¾¼ãããã¾ãã¯åå¨ããç´¢å¼ãæ´æ°
              ãããæ¸åº«ã«ä½ã®å¤åããªãã¦ãæ´æ°ã¯è¡ãããããã®ä¿®æ£åã¯ã©ããªæä½ã¨
              ãåæã«ç¨ãããã¨ãã§ããããåç¬ã§ãç¨ãããã¨ãã§ããã `ar s'
              ãæ¸åº«ã«å¯¾ãã¦å®è¡ããã®ã¯ã `ranlib' ã¨ç価ã§ããã


       S      æ¸åº«ã®ã·ã³ãã«ãã¼ãã«ãä½æããªãã
              ããã¯å¤§ããªæ¸åº«ãæ§ç¯ããå ´åã¯çµæ§ãªé度åä¸ã«ãªãã
              çµæã¨ãã¦ã§ããæ¸åº«ã¯ããªã³ã«ããã¯ä½¿ããã¨ãã§ããªãã
              ã·ã³ãã«ãã¼ãã«ãã¤ããã«ã¯ã æå¾ã®æ®µéã§å®è¡ããã ar ã« S ä¿®æ£å‐
              ãã¤ããªããããããã¯ãã®ã¢ã¼ã«ã¤ãã« ranlib ãå®è¡ããªããã°ãªããªãã


       u      é常 ar r... ã¯ãªã¹ãããããã¹ã¦ã®ãã¡ã¤ã«ãæ¸åº«ã«æ¿å¥ãããæå®ãããã¡
              ã¤ã«ã¨ååã®ã¡ã³ãã¼ãæ¸åº«ä¸ã«ãã§ã«ãã£ãæã«ãåã®ã¡ã³ãã¼ã®æ¹ãå¤ã
              å ´åã«éã£ã¦æ¿å¥ãè¡ãããå ´åã«ã¯ããã®ä¿®æ£åã使ãã¨è¯ã (update)ã `u'
              ä¿®æ£åãç¨ãããã¨ãã§ããã®ã¯ r æä½ (replace) ã®å ´åã«éãããã qu
              ã®çµã¿åããã¯è¨±ãããªãããªããªãã¿ã¤ã ã¹ã¿ã³ãããã§ãã¯ãã㨠`q'
              æä½ã®é度é¢ã§ã®å©ç¹ãæãªããã¦ãã¾ãããã§ããã


       v      ãã®ä¿®æ£åã¯é¥è ( verbose ) ã¢ã¼ãã®åä½ãæå®ããããã«ç¨ããããã `v' ä¿®æ‐
              £åãè¿½å  ãããã¨ãå¤ãã®æä½ã«ããã¦ããã詳細ãªæå ±ã表示ããã
              (ä¾ãã°å¦çã ã¦ãããã¡ã¤ã«åãªã©)ã


       V      ãã®ä¿®æ£å㯠ar ã®ãã¼ã¸ã§ã³çªå·ã表示ããã


é¢é£é ç®
       info ã® ` binutils ' ã¨ã³ããªã The GNU Binary Utilities, Roland H. Pesch
       (October 1991)ã nm(1ranlib(1)


èä½æ¨©
       Copyright (c) 1991 Free Software Foundation, Inc.

       Permission is granted to make and distribute verbatim copies of this
       manual provided the copyright notice and this permission notice are
       preserved on all copies.

       Permission is granted to copy and distribute modified versions of this
       manual under the conditions for verbatim copying, provided that the
       entire resulting derived work is distributed under the terms of a
       permission notice identical to this one.

       Permission is granted to copy and distribute translations of this
       manual into another language, under the above conditions for modified
       versions, except that this permission notice may be included in
       translations approved by the Free Software Foundation instead of in the
       original English.



cygnus support                  5 November 1991                          ar(1)