home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 May / W2KPRK.iso / apps / posix / source / MAN / AR.PRT next >
Text File  |  1999-11-17  |  7KB  |  133 lines

  1. ar - create and maintain library archives
  2. ar -d [-Tv] archive file ...
  3. ar -m [-Tv] archive file ...
  4. ar -m [-abiTv] position archive file ...
  5. ar -p [-Tv] archive [file ...]
  6. ar -q [-cTv] archive file ...
  7. ar -r [-cuTv] archive file ...
  8. ar -r [-abciuTv] position archive file ...
  9. ar -t [-Tv] archive [file ...]
  10. ar -x [-ouTv] archive [file ...]
  11. The utility creates and maintains groups of files  combined  into
  12. an  archive.   Once an archive has been created, new files can be
  13. added and existing files can be extracted, deleted, or  replaced.
  14. Files  are named in the archive by a single component, i.e., if a
  15. file referenced by a path containing a slash (``/'') is  archived
  16. it will be named by the last component of that path.  When match-
  17. ing paths listed on the command line against file names stored in
  18. the  archive,  only  the  last component of the path will be com-
  19. pared.  All informational and error messages use the path  listed
  20. on  the command line, if any was specified, otherwise the name in
  21. the archive is used.  If multiple files in the archive  have  the
  22. same name, and paths are listed on the command line to ``select''
  23. archive files for an operation, only the  file  with  a  matching
  24. name will be selected.  The normal use of is for the creation and
  25. maintenance of libraries suitable for use with  the  loader  (see
  26. although  it  is not restricted to this purpose.  The options are
  27. as follows: -a A positioning modifier used with  the  options  -r
  28. and  -m.  The files are entered or moved the archive member which
  29. must be specified.  -b A positioning modifier used with  the  op-
  30. tions  -r  and  -m.   The  files are entered or moved the archive
  31. member which must be specified.  -c Whenever an archive is creat-
  32. ed,  an  informational message to that effect is written to stan-
  33. dard error.  If the -c option is specified, creates  the  archive
  34. silently.   -d  Delete the specified archive files.  -i Identical
  35. to the -b option.  -m Move the specified archive files within the
  36. archive.   If  one of the options -a, -b or -i are specified, the
  37. files are moved before or after the file in the archive.  If none
  38. of those options are specified, the files are moved to the end of
  39. the archive.  -o Set the access and  modification  times  of  ex-
  40. tracted  files  to  the modification time of the file when it was
  41. entered into the archive.  This will fail if the user is not  the
  42. owner of the extracted file or the super-user.  -p Write the con-
  43. tents of the specified archive files to the standard output.   If
  44. no  files are specified, the contents of all the files in the ar-
  45. chive are written in the order they appear in  the  archive.   -q
  46. (Quickly)  append the specified files to the archive.  If the ar-
  47. chive does not exist a new archive file is created.  Much  faster
  48. than the -r option, when creating a large archive piece-by-piece,
  49. as no checking is done to see if the files already exist  in  the
  50. archive.   -r  Replace or add the specified files to the archive.
  51. If the archive does not exist a  new  archive  file  is  created.
  52. Files  that replace existing files do not change the order of the
  53. files within the archive.  New files are appended to the  archive
  54. unless  one  of the options -a, -b or -i is specified.  -T Select
  55. and/or name archive members using only the first fifteen  charac-
  56. ters  of  the archive member or command line file name.  The his-
  57. toric archive format had sixteen bytes for  the  name,  but  some
  58. historic  archiver and loader implementations were unable to han-
  59. dle names that used the entire space.  This means that file names
  60. that  are not unique in their first fifteen characters can subse-
  61. quently be confused.  A warning message is printed to  the  stan-
  62. dard error output if any file names are truncated.  (See for more
  63. information.) -t List the specified files in the order  in  which
  64. they appear in the archive, each on a separate line.  If no files
  65. are specified, all files in the archive are  listed.   -u  Update
  66. files.   When  used with the -r option, files in the archive will
  67. be replaced only if the disk file has a newer  modification  time
  68. than  the  file  in  the  archive.  When used with the -x option,
  69. files in the archive will be extracted only if the  archive  file
  70. has  a newer modification time than the file on disk.  -v Provide
  71. verbose output.  When used with the -d, -m,  -q  or  -x  options,
  72. gives  a  file-by-file  description  of the archive modification.
  73. This description consists of three, white-space separated fields:
  74. the  option  letter, a dash (``-'') and the file name.  When used
  75. with the -r option, displays the description as  above,  but  the
  76. initial  letter  is  an ``a'' if the file is added to the archive
  77. and an ``r'' if the file replaces a file already in the  archive.
  78. When  used  with  the -p option, the name of each printed file is
  79. written to the standard output before the contents of  the  file,
  80. preceded  by a single newline character, and followed by two new-
  81. line characters, enclosed in less-than (``<'')  and  greater-than
  82. (``>'')  characters.   When  used with the -t option, displays an
  83. ``ls -l'' style listing of information about the members  of  the
  84. archive.   This  listing consists of eight, white-space separated
  85. fields: the file permissions (see  the  decimal  user  and  group
  86. ID's,  separated  by  a  single  slash (``/''), the file size (in
  87. bytes), the file modification time (in the format ``%b  %e  %H:%M
  88. %Y''),  and  the  name of the file.  -x Extract the specified ar-
  89. chive members into the files named by the command line arguments.
  90. If  no  members are specified, all the members of the archive are
  91. extracted into the current directory.  If the file does  not  ex-
  92. ist, it is created; if it does exist, the owner and group will be
  93. unchanged.  The file access and modification times are  the  time
  94. of  the extraction (but see the -o option).  The file permissions
  95. will be set to those of the file when it was entered into the ar-
  96. chive;  this  will  fail  if the user is not the owner of the ex-
  97. tracted file or the super-user.  The utility exits 0 on  success,
  98. and  >0 if an error occurs.  TMPDIR The pathname of the directory
  99. to use when creating temporary  files.   /tmp  default  temporary
  100. file  directory ar.XXXXXX temporary file names By default, writes
  101. archives that may be incompatible with historic archives, as  the
  102. format  used  for  storing archive members with names longer than
  103. fifteen characters has changed.  This implementation of is  back-
  104. ward compatible with previous versions of in that it can read and
  105. write (using the -T option) historic archives.  The -T option  is
  106. provided  for compatibility only, and will be deleted in a future
  107. release.  See for more information.  The utility is  expected  to
  108. offer  a superset of the POSIX 1003.2 functionality.  ld(1), ran-
  109. lib(1), strmode(3), ar(5)
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.