![]() ![]() If you’re curious, don’t hesitate to unzip one of them to see what’s inside: sh$ unzip some-file.odtĪll that being said, in the Unix-like world, I would still favor tar archive type because the zip file format does not support all the Unix file system metadata reliably. All those files formats are zip archives in a disguise. odp …) used by LibreOffice or other office suites. For example, that file format was retained by Sun for JAR archives used to distribute compiled Java applications. You can even find the zip file format in unexpected places. Today you can freely use any archive file format both on Linux & Windows.īut as the zip format is natively supported on Windows, this one is especially present in cross-platform environments. Or more recently xz which is an LZMA algorithm implementation similar to the one used in the 7zip utility. For example, the Burrows–Wheeler algorithm implemented in bzip2 (leading to. tgz to add again to that confusion - and to comply with the long forgotten 8.3 MS-DOS file name limitations).Īs computer science evolved, other compression algorithms were designed for higher compression ratio. And after that, you will compress that archive. So, in order to create a compressed archive, you have first to create an archive using the tar utility for example. So, in parallel, gzip was created to implement the LZ77 algorithm in a free software without breaking any PKWARE patent.Ī key element of the Unix philosophy being “ Do One Thing and Do It Well“, gzip was designed to only compress files. But being developed commercially by PKWARE, the zi p format has suffered from patent encumbering for years. The most common compression scheme for zip is deflate which itself is an implementation of the LZ77 algorithm. So a decade after the introduction or tar, zip came out in the MS-DOS world as an archive format supporting compression. But as time passed, and with the advent of the personal computer era, people realized they could make huge savings on storage by compressing data. Not the kind of tar you are looking forĬreating archives is nice. Maybe because the tar command was good enough and simpler to use. That being said, nor ar nor cpio gained as much as popularity as tar among users. deb package files used on Debian systems are ar archives! And on MacOS X, mpkg packages are (were?) gzip-compressed cpio archives. But ar can be used to create archives of any kind. Programmers probably know ar as it is mostly used today to create static libraries, which are no more than archives of compiled files. Tar is certainly not the only standard Unix tool to create archives. The only gain you can expect using tar alone would be by avoiding the space wasted by the file system as most of them allocate space at some granularity (for example, on my system, a one byte long file uses 4kB of disk space, 1000 of them will use 4MB but the corresponding tar archive “only” 1MB). In other words, if you tar 100 files of 50kB, you will end up with an archive whose size will be around 5000kB. One key thing to remember is a plain tar file is just an archive whose data are not compressed. Even if nowadays tape drives are unknown to the vast majority of individual Linux users, tarballs - the nickname of tar archives - are still commonly used to package several files or even entire directory tree (or even forests) into a single file. The tar utility was designed as a way to efficiently write many files on tapes. In some cold morning of January 1979, the tar utility made its appearance as part of the newly released Unix V7. Like many things about Unix & Unix-like systems, the story starts a long long time ago, in a not so distant galaxy called the seventies. If you are in hurry or just want to get something easy to remember, here is the difference between zip and tar and gz: File typeįile (archive or not) compressed using gzip But do you know the difference between Tar and Zip and Gz? Why we use them and which is more efficient, tar or zip or gz? Difference between tar, zip and gz While downloading files, it is not uncommon to see the .tar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |