TAR (.tar)
Unix archive format that bundles multiple files into a single file without compression. Almost always used with GZ or BZ2 compression as .tar.gz or .tar.bz2.
- Extension
- .tar
- MIME Type
- application/x-tar
Last updated
Overview
TAR (Tape Archive) is a file format originally developed for writing data to magnetic tape drives in Unix systems during the 1970s. Unlike ZIP, RAR, or 7Z, TAR itself performs no compression — it simply concatenates files and directories into a single stream with header records separating them. Compression is applied separately by wrapping the TAR file with gzip (.tar.gz or .tgz), bzip2 (.tar.bz2 or .tbz2), or xz (.tar.xz) compression.
The TAR format is the standard for distributing source code and software packages in the Unix/Linux ecosystem. Almost all Linux software source releases are distributed as .tar.gz files, and Linux package managers (APT, RPM) use TAR-based archives internally.
Common Uses
- Linux software source distribution —
./configure && make && make installworkflows start from .tar.gz tarballs - Unix/Linux backups — system administrators archive directory trees as .tar.gz for backup storage
- Docker images — Docker layers are TAR archives;
docker saveexports images as .tar files - Git bundle archives —
git archivecreates TAR archives of repository snapshots - System package formats — Debian (.deb) and RPM packages contain TAR archives internally
Advantages
- Preserves Unix metadata — file permissions, ownership, and symlinks are stored exactly — critical for system backups
- Streaming-friendly — TAR's sequential format works with pipes, network streams, and tape drives
- Compression flexibility — choose any compression algorithm (gzip, bzip2, xz, zstd) independently
- De facto Linux standard — every Linux and macOS system can create and extract TAR without additional software
Limitations
- No compression alone — TAR without compression creates a file nearly the same size as the original directory
- No built-in integrity checking — individual files within a TAR cannot be verified without extracting them
- No random access — extracting a single file from a large compressed TAR requires reading the entire archive from the start
- Windows unfriendly — not natively supported on Windows without WSL, 7-Zip, or similar tools
Supported Software
- Linux/macOS:
tarcommand (native, built-in) - Windows: WSL (native tar), 7-Zip, PeaZip, WinRAR
- GUI tools: PeaZip, Ark (Linux), Keka (macOS), The Unarchiver (macOS)