GNU tar
The standard Unix archiver.
GNU tar (tape archiver) bundles many files into a single archive stream, optionally compressed with gzip, bzip2, xz, zstd, or lzip. It originated as a tape-backup utility on early Unix systems, where the archive would be streamed onto magnetic tape; the same on-disk format has since become the universal Unix way to package directory trees for transport, backup, and software distribution.
The format and command-line interface have stayed remarkably stable across decades. GNU tar adds some extensions (the long- filename and long-link headers, sparse-file handling, ACL and xattr support) that have been adopted by other implementations where compatible. The GNU implementation is the reference on Linux; macOS and the BSDs ship libarchive's bsdtar, which understands the same files.
tar is one of the most universally available pieces of software in computing. Source-code releases, distribution package formats, container image layers, and many backup tools all use tar archives at some level.
Install
Already preinstalled. macOS ships BSD tar; GNU tar via: brew install gnu-tar
Authors
- GNU Project