Skip to content

Instantly share code, notes, and snippets.

@ruario
Last active December 22, 2025 11:59
Show Gist options
  • Select an option

  • Save ruario/b3e7471230fc64e3b59df2a2494d66ee to your computer and use it in GitHub Desktop.

Select an option

Save ruario/b3e7471230fc64e3b59df2a2494d66ee to your computer and use it in GitHub Desktop.
TAR vs RAR vs 7‑Zip vs Info‑ZIP on Linux

Tar vs Rar vs 7‑Zip vs Info‑ZIP on Linux

TL;DR

  • tar: Full Linux filesystem metadata and special file support.
  • rar: Extensive feature set: permissions, ownership, recovery, deduplication, filtering, archive content manipulation, strong encryption, etc.
  • 7z: Strong encryption where open source is a requirement.
  • zip: Maximum compatibility.

Note: They are actually all widely supported for extraction by common libaries. You will not realistically find a modern system, configured for desktop use, that cannot open all of these but zip will be less confusing to non-technical users and has wider support on legacy, mobile and embedded platforms out of the box.

Tar

  • Positives

    • Full Linux filesystem metadata and file types (ACLs, xattrs, SELinux labels, device nodes, FIFOs, etc.)
  • Negatives

    • No built‑in encryption
    • No recovery records
    • No deduplication
    • No random access (stream format)

Rar

  • Positives

    • Recovery records
    • Deduplication
    • AES‑256 encryption with metadata protection (also 7‑Zip)
    • Multi‑volume archives with optional redundancy
    • Secure wipe
    • In archive content manipulation (search in files, path rewriting, etc.)
    • Rich filtering (size, time, attributes, etc.)
    • Linux metadata preservation (basic permissions and ownership but tar is more complete)
  • Negatives

    • Proprietary creation (license required; extraction is entirely free)

7z (7‑Zip)

  • Positives:

    • Open‑source creation (also tar and zip)
    • AES‑256 encryption with metadata protection (also rar)
  • Negatives:

    • Does not preserve file metadata
    • No recovery records
    • No deduplication
    • No unique featues (that are not already well covered by the other options)

Zip (Info‑ZIP)

  • Positives

    • Maximum interoperability
  • Negatives

    • Weak encryption (ZipCrypto; AES support inconsistent)
    • Poor Linux metadata preservation (due to various decompressor implementations)
    • No recovery records
    • No deduplication
    • Typically lower compression ratios

Feature / Capability tar (with compressor) rar 7z (7‑Zip) zip (Info‑ZIP)
Compression Ratio ✅ High (backend‑dependent) ✅ High ✅ High ❌ Weaker (most distros only offer DEFLATE/BZip2)
Encryption ➖ None (possible with external tools like GPG) ✅ AES‑256 ✅ AES‑256 ⚠️ ZipCrypto (weak), AES optional in newer forks and other zip supporting tools
Encrypt Metadata ➖ None (possible with external tools like GPG) ✅ Supported ✅ Supported ❌ Not supported
Recovery Records ➖ None (par2 needed for recovery files) ✅ Supported via rr & rv ➖ None (par2 needed for recovery files) ➖ None (par2 needed for recovery files)
Symbolic links ✅ Preserved ✅ Supported via -ol ✅ Supported via -snl ✅ Supported via -y
Hard links ✅ Preserved ✅ Supported via -oh ✅ Supported via -snh ❌ Not supported
Deduplication ➖ Only via hard links ✅ Supported via -oi ➖ Only via hard links ❌ Not supported
UNIX Ownership ✅ Preserved ✅ Supported via -ow ❌ Not supported ⚠️ Fragile support (depends on unzipper)
UNIX Permissions ✅ Preserved ✅ Preserved ❌ Not supported ⚠️ Fragile support (depends on unzipper)
Special File Types & Extended Attributes ✅ Full support ➖ Hard links, symlinks, ownership, basic permissions ❌ Hard links, symlinks only ⚠️ Fragile ownership and basic permissions (depends on unzipper)
Solid / Non‑Solid Options ❌ Always solid stream ✅ Supported ✅ Supported ❌ Always per‑file compression
Per‑File Access ❌ Slow (scan stream) ✅ Supported ✅ Supported ✅ Supported
Multi‑Threading ➖ Depends on compressor backend ✅ Supported ✅ Supported ❌ Not supported
Secure Wipe ❌ Not supported ✅ Supported -dw ❌ Not supported ❌ Not supported
Path Rewriting ✅ Supported (GNU/BSD tar) ✅ Supported ❌ Not supported ❌ Not supported
Archive content search ❌ Not supported ✅ Supported (via i) ❌ Not supported ❌ Not supported
Advanced Filtering (e.g. size and time) ➖ Basic filters (could pair with find for more) ✅ Rich filters ➖ Basic filters (could pair with find for more) ➖ Basic filters (could pair with find for more)
Split Volumes ➖ External split only ✅ Supported ✅ Supported ✅ Supported
Archive Timestamp update to last file ➖ Not directly (possible with a shell script wrapper) ✅ Supported ✅ Supported ✅ Supported
Licensing ✅ Open Source ⚠️ Proprietary (creation); ✅ Open Source (extraction) ✅ Open Source ✅ Open Source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment