Gzipped Tarball File
It’s not just a file. It’s a time capsule of Unix philosophy, a marriage of two very different tools, and the reason you’re not drowning in thousands of loose source files.
For source code, system backups, and Docker layers, .tar.gz wins because it faithfully restores the original environment.
| Feature | .tar.gz | .zip | |--------|-----------|--------| | Preserves Unix permissions | ✅ Yes | ❌ No (ignores execute bits, symlinks) | | Streamable | ✅ Yes (tape/pipe friendly) | ❌ Needs central directory at end | | Open standard | ✅ Fully | ⚠️ Partially (some extensions proprietary) | | Compression ratio | ✅ Very good (DEFLATE) | ✅ Same algorithm | | Random access | ❌ Painful | ✅ Possible | gzipped tarball
The flags stick like glue: reate, e x tract, z (gzip), f ile. 🎁 Final Thought The next time you curl a .tar.gz of some GitHub repo, think of the 1970s tape drives, the 1990s compression wars, and the stubborn Unix philosophy of “do one thing well.”
If you tar -cf myfiles.tar folder/ , you get a .tar file that’s often larger than the original folder (due to metadata and padding). It’s not just a file
But gzip cannot pack multiple files. Give it a directory, and it says: “No, thanks.”
So the classic Unix pipeline was born:
Now go forth and tar -xzf something. 🐧 Would you like a follow-up post about or building your own tar-like archiver in Python ?