Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 3131  / 2 Years ago, mon, september 5, 2022, 3:59:21

Could anyone tell me what is up with so many archives, and how are they differ?



There's at least five that I can think of, .tar.tz, .tar.gz, .tar.bz2, .tar.lz, .tar.z



Which is best for what applications? It just seems silly to make so many variations of the same file but I'm sure there's a reason.


More From » filemanager

 Answers
6

The .gz, .xz, .bz2, .7z, .lz, .z suffixes are used to make clear that the file is compressed with said compression algorithm. Its use is not limited to .tar files, you will also see files such as initrd.gz (an compressed initial ramdisk) or manual.txt.gz (for a compressed text document). You may also see file.tgz which is also indicates a gzip-compressed tarball (like file.tar.gz).



The file extension is a convention, it does not necessarily describe the file contents. To check what kind of file you are handling, use the file command. Example:



$ file data.tar.gz
data.tar.gz: gzip compressed data, from Unix
$ gunzip -c data.tar.gz | file -
/dev/stdin: POSIX tar archive (GNU)


In my experience, gzip-compressed files (.gz) are the most common ones. It is fast in compressing and decompressing, though there are other algorithms that yield better compression ratios.


[#28219] Tuesday, September 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
izeeas

Total Points: 412
Total Questions: 105
Total Answers: 118

Location: Trinidad and Tobago
Member since Fri, May 8, 2020
4 Years ago
izeeas questions
;