this post was submitted on 28 Nov 2025
24 points (96.2% liked)

Linux Questions

2896 readers
21 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS
 

A .tar archive is basically only the files cat'ed together, with a header and index added, right?

And a .tar.gz takes forever to modify, because it needs to first extract the .tar.

So why is there no archive format that just cat'es the compressed files together?

you are viewing a single comment's thread
view the rest of the comments
[–] roflo1@piefed.social 22 points 1 day ago

I’ll try to explain it in another way. First, let’s talk about “semantics”:

Usually we assume that a tarball contains multiple files, and a gz is a single file compressed.

So a .tar.gz file is a single tarball that has been compressed.

A .gz.tar is understood to be a tarball containing a single gzipped file. But if that’s indeed what the file is, it doesn’t make much sense to tar it in the first place.

Moving on to what you really want to accomplish: you can certainly create many gz files and tar them, but we wouldn’t call it a .gz.tar file since tar doesn’t care about the format of the included files. Much like a bunch of compressed PDFs aren’t named .pdf.tar

Also, I’d like to point out that neither tarballs nor gzipped files are optimized for modifying.