Ar (Unix)

ar
Original author(s)Ken Thompson,
Dennis Ritchie
(AT&T Bell Laboratories)
Developer(s)Various open-source and commercial developers
Initial releaseNovember 3, 1971; 52 years ago (1971-11-03)
Written inC
Operating systemUnix, Unix-like, V, Plan 9, Inferno
PlatformCross-platform
TypeCommand
LicensePlan 9: MIT License
archiver format
Filename extension
.a, .lib, .ar[1]
Internet media type
application/x-archive[1]
Magic number!<arch>
Type of formatarchive format
Container forusually object files (.o)
StandardNot standardized, several variants exist
Open format?Yes[2]

The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be used to create archives for any purpose, but has been largely replaced by tar for purposes other than static libraries.[3] An implementation of ar is included as one of the GNU Binutils.[2]

In the Linux Standard Base (LSB), ar has been deprecated and is expected to disappear in a future release of that standard. The rationale provided was that "the LSB does not include software development utilities nor does it specify .o and .a file formats."[4]

  1. ^ a b "application/x-archive". Archived from the original on 2019-12-08. Retrieved 2019-03-11.
  2. ^ a b "ar(1) – Linux man page". Retrieved 3 October 2013.
  3. ^ "Static Libraries". TLDP. Retrieved 3 October 2013.
  4. ^ Linux Standard Base Core Specification, version 4.1, Chapter 15. Commands and Utilities > ar