TAR (Tape ARchive) is the standard archive format in Linux and Unix systems, with a history stretching back to 1979 when it was created for writing data to sequential tape drives. Unlike ZIP or RAR, TAR does not compress data — it only bundles multiple files and directories into a single file while preserving their directory structure, permissions, ownership, and timestamps. Compression is typically added as a separate layer by piping through gzip (.tar.gz), bzip2 (.tar.bz2), or xz (.tar.xz).
A raw .tar file is uncompressed, meaning its size equals the combined size of all contained files plus small metadata overhead. This makes TAR files fast to create and extract since no compression or decompression computation is involved.
AnExplorer opens TAR files natively — browse contents, preview files, or extract everything to a folder.
Quick Answer
Open AnExplorer → tap the .tar file → browse the contents. Long-press → Extract to extract all files to a folder.
What Is a TAR File?
TAR stands for Tape ARchive. It was originally designed to write multiple files sequentially to magnetic tape for backup purposes. Today it remains the dominant archiving tool in Unix, Linux, and macOS environments because of its simplicity and reliability.
A TAR file contains:
- File data — the actual content of each archived file
- Header blocks — 512-byte blocks preceding each file containing metadata
- Directory structure — full path information preserving folder hierarchy
- Unix metadata — file permissions (chmod), ownership (uid/gid), modification timestamps
- Symlinks and hardlinks — preserved when the archive is created on Unix systems
TAR does not compress anything. It creates a faithful replica of a directory tree in a single file. This design philosophy separates concerns: TAR handles bundling, and a separate tool handles compression.
Where You Encounter TAR Files
TAR files appear frequently in these contexts:
- Linux software distribution — source code tarballs from project websites
- GitHub source downloads — repository archives as
.tar.gz - NAS backups — Synology, QNAP, and TrueNAS export backups as TAR
- Docker and container images — container layers are stored as TAR files
- macOS terminal exports — files bundled with the
tarcommand on Mac - Server backups — cPanel, Plesk, and custom backup scripts produce TAR
- Android backup tools — some apps create per-app
.tarbackups - Package managers —
.deb(Debian) and.rpm(Red Hat) packages contain TAR archives internally - Developer toolchains — SDKs, compilers, and cross-compilation tools
How to Open TAR Files with AnExplorer
Browse Without Extracting
- Launch AnExplorer
- Navigate to the folder containing your
.tarfile - Tap the file — it opens in the archive viewer
- Browse the directory structure inside the TAR
- Tap individual files to preview them (text, images, documents)
Extract the Entire Archive
- Navigate to the
.tarfile in AnExplorer - Long-press the file to select it
- Tap the menu (⋮) → Extract
- Choose a destination folder
- Tap OK — extraction completes quickly since no decompression is needed
Extract Specific Files
- Tap the
.tarfile to browse inside - Navigate to the specific files or folders you want
- Long-press to select them
- Tap Extract → choose destination
- Only selected items are extracted
How to Create TAR Files with AnExplorer
You can create TAR archives directly on your device:
- Navigate to the files or folders you want to bundle
- Long-press to select them
- Tap menu (⋮) → Compress
- Choose TAR as the format
- Name your archive
- Tap OK — the TAR file is created
Note: Creating a raw TAR produces an uncompressed archive. If you need compression, choose TAR.GZ format instead for a compressed bundle.
Technical Details
TAR Header Format
Each file in a TAR archive is preceded by a 512-byte header containing:
| Field | Size | Description |
|---|---|---|
| Name | 100 bytes | Filename (path) |
| Mode | 8 bytes | Unix file permissions |
| UID | 8 bytes | Owner user ID |
| GID | 8 bytes | Owner group ID |
| Size | 12 bytes | File size in bytes (octal) |
| Mtime | 12 bytes | Last modification time |
| Checksum | 8 bytes | Header verification |
| Type | 1 byte | File type (regular, directory, symlink) |
| Linkname | 100 bytes | Target for symlinks |
TAR Format Variants
Several TAR header formats exist:
| Format | Year | Key Features |
|---|---|---|
| V7 (original) | 1979 | 100-character paths, basic metadata |
| USTAR | 1988 | 256-character paths, device files |
| POSIX (pax) | 2001 | Unlimited path length, extended attributes |
| GNU tar | 1992 | Long names, sparse files, incremental backup |
AnExplorer handles all common TAR variants. Most modern TAR files use either GNU tar or POSIX pax format.
TAR vs Compressed TAR
| Format | Extension | Compression | Extraction Speed | File Size |
|---|---|---|---|---|
| TAR | .tar | None | Instant (disk speed) | Same as original |
| TAR + GZIP | .tar.gz or .tgz | GZIP (fast) | Fast | ~30–60% smaller |
| TAR + BZIP2 | .tar.bz2 or .tbz2 | BZIP2 (medium) | Moderate | ~35–65% smaller |
| TAR + XZ | .tar.xz or .txz | XZ/LZMA (slow) | Slow | ~40–70% smaller |
| TAR + ZSTD | .tar.zst | Zstandard (fast) | Very fast | ~35–60% smaller |
All compressed variants are supported by AnExplorer. The format you encounter depends on who created the archive and what trade-offs they preferred between size and speed.
TAR vs ZIP — Design Philosophy
| Aspect | TAR | ZIP |
|---|---|---|
| Compression | Separate (external tool) | Built-in (per-file) |
| File access | Sequential | Random access |
| Metadata | Full Unix permissions | Basic timestamps |
| Symlinks | ✅ Preserved | ❌ Not supported |
| Open standard | ✅ POSIX | ✅ PKWARE |
| Dominant platform | Linux/Unix/Mac | Windows/Cross-platform |
| Creating on mobile | ✅ AnExplorer | ✅ AnExplorer |
TAR's sequential nature means the entire file must be read to find a file near the end. ZIP's central directory allows jumping directly to any file. However, TAR's whole-stream compression typically achieves better ratios than ZIP's per-file compression, especially for collections of similar small files.
Common TAR Use Cases on Android
| Source | What You Get | What To Do |
|---|---|---|
| GitHub source download | repository-main.tar.gz | Extract to read source code |
| NAS backup | TAR backup files | Extract to restore specific files |
| Docker image export | Layer TAR files | Browse contents for inspection |
| Linux software | Source tarball | Extract and read documentation |
| macOS file transfer | TAR from Terminal | Extract to access transferred files |
| Server migration | Full site backup | Extract database and file data |
Permissions in TAR Files
TAR archives preserve Unix file permissions (chmod) and ownership (chown). When extracting on Android:
- Android's file system does not enforce Unix permissions the same way as Linux
- Files are extracted with standard Android read/write permissions
- Executable flags (
chmod +x) are not meaningful on Android's filesystem - Shell scripts inside TAR archives will not execute directly on Android
- Ownership information (UID/GID) is ignored during extraction
This means TAR files extracted on Android lose their Unix-specific metadata. If you re-archive the extracted files, the new archive will have Android's default permissions.
Troubleshooting
TAR extraction takes a long time
- Raw
.tarextraction is fast (limited by disk I/O speed, no CPU work) - Compressed variants (
.tar.gz,.tar.bz2,.tar.xz) require CPU decompression - A 1 GB
.tar.bz2can take 2-5 minutes on a mid-range phone .tar.xzis the slowest to decompress but produces the smallest files
"Insufficient storage" error during extraction
- TAR files do not show uncompressed size before extraction
- Compressed TAR variants can expand 2-5x their compressed size
- Estimate needed space as 3x the file size and verify you have that available
- Use Memory Cleaner to free storage before extracting large archives
Extracted files have wrong names or garbled characters
- The TAR may have been created with a different character encoding
- Most modern TAR tools use UTF-8, but older archives may use system-specific encodings
- AnExplorer handles UTF-8 and common legacy encodings
Cannot find a specific file inside a large TAR
- Use AnExplorer's search function while browsing the archive contents
- TAR files can contain thousands of files in deep directory structures
- The archive browser lets you navigate the folder tree just like normal directories
Related Guides
- Open TAR.GZ Files — compressed TAR variant
- Open ZIP Files — ZIP archive guide
- Open 7Z Files — high-compression archive
- Open RAR Files — RAR archive guide
- Archive Manager
