[0m


AR(1)		    UNIX Programmer's Manual		    AR(1)



[1mNAME
     [0mar - archive and library maintainer

[1mSYNOPSIS
     ar [0m[-]key [ posname ] afile [ name ... ]

[1mDESCRIPTION
     [0m_A_r maintains groups of files combined into a single archive
     file.  Its main use is to create and update library files as
     used by the loader.  It can be used, though, for any similar
     purpose.  [1mN.B: [0mThis version of _a_r uses a ASCII-format
     archive which is portable among the various machines running
     UNIX.  Programs for dealing with older formats are avail-
     able: see _a_r_c_v(8).

     _K_e_y is one character from the set [1mdrqtpmx, [0moptionally con-
     catenated with one or more of [1mvuaibclo. [0m_A_f_i_l_e is the archive
     file.  The _n_a_m_e_s are constituent files in the archive file.
     The meanings of the _k_e_y characters are:

     [1md	  [0mDelete the named files from the archive file.

     [1mr	  [0mReplace the named files in the archive file.	If the
	  optional character [1mu [0mis used with [1mr, [0mthen only those
	  files with `last-modified' dates later than the archive
	  files are replaced.  If an optional positioning charac-
	  ter from the set [1mabi [0mis used, then the _p_o_s_n_a_m_e argument
	  must be present and specifies that new files are to be
	  placed after ([1ma[0m) or before ([1mb [0mor [1mi[0m) _p_o_s_n_a_m_e.	Otherwise
	  new files are placed at the end.

     [1mq	  [0mQuickly append the named files to the end of the
	  archive file.  Optional positioning characters are
	  invalid.  The command does not check whether the added
	  members are already in the archive.  Useful only to
	  avoid quadratic behavior when creating a large archive
	  piece-by-piece.

     [1mt	  [0mPrint a table of contents of the archive file.  If no
	  names are given, all files in the archive are tabled.
	  If names are given, only those files are tabled.

     [1mp	  [0mPrint the named files in the archive.

     [1mm	  [0mMove the named files to the end of the archive.  If a
	  positioning character is present, then the _p_o_s_n_a_m_e
	  argument must be present and, as in [1mr, [0mspecifies where
	  the files are to be moved.

     [1mx	  [0mExtract the named files.  If no names are given, all
	  files in the archive are extracted.  In neither case
	  does [1mx [0malter the archive file. Normally the `last-



Printed 22/10/92    Revision 1.4 of 07/11/90			1






AR(1)		    UNIX Programmer's Manual		    AR(1)



	  modified' date of each extracted file is the date when
	  it is extracted. However, if [1mo [0mis used, the `last-
	  modified' date is reset to the date recorded in the
	  archive.

     [1mv	  [0mVerbose.  Under the verbose option, _a_r gives a file-
	  by-file description of the making of a new archive file
	  from the old archive and the constituent files.  When
	  used with [1mt, [0mit gives a long listing of all information
	  about the files.  When used with [1mp[0m, it precedes each
	  file with a name.

     [1mc	  [0mCreate.  Normally _a_r will create _a_f_i_l_e when it needs
	  to.  The create option suppresses the normal message
	  that is produced when _a_f_i_l_e is created.

     [1ml	  [0mLocal.  Normally _a_r places its temporary files in the
	  directory specified by the environment variable [1mTMPDIR
	  [0m(with /var/tmp as the default if TMPDIR is not
	  defined).  This option causes them to be placed in the
	  current working directory instead.

[1mFILES
     [0m/var/tmp/v*    temporaries

[1mSEE ALSO
     [0mlorder(1), ld(1), ranlib(1), ar(5), arcv(8)

[1mBUGS
     [0mIf the same file is mentioned twice in an argument list, it
     may be put in the archive twice.

     The `last-modified' date of a file will not be altered by
     the [1mo [0moption if the user is not the owner of the extracted
     file, or the super-user.




















Printed 22/10/92    Revision 1.4 of 07/11/90			2



[0m