I see here that a tar is used to merge several files into one. So why do I see so often one zip file in a tar?
example : archive.zip.tar
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI see here that a tar is used to merge several files into one. So why do I see so often one zip file in a tar?
example : archive.zip.tar
Tar doesn't compress* - it's 'tape archive' and exists purely to serialise data - traditionally to a tape device.
It serialises a directory structure, including permissions and file contents.
gzip
doesn't preserve structure, and just compresses on a 'file' bases - hence why you tend to get .tar.gz
- it's a serialised structure that has then been compressed.
I don't know why you'd get .zip.tar
though, given that zip
does support directory structures, permissions and compression. It seems largely nonsensical to do so.
* newer versions of tar
include the z
flag to compress - this wasn't part of the original spec. So you'd tar cvf - ./path_to_tar | gzip -c > file.tar.gz
.tar.gz
and variations on the other hand is extremely common.)