ZIP is perhaps one of the oldest compression formats, dating back to 1989 with PKZIP, which is in fact an evolution from the ARC compression format. ZIP compressed files have the extension .zip or .ZIP but there are also other files which have “zip” in their names but have nothing to do with ZIP. One example of them is the GZIP format which we have discussed in our previous article. The programs that are used to compress and unpack ZIP files are different; you cannot open a GZIP file with a ZIP file handler.
In the old days, when users needed to carry files on floppy disks, which had a capacity of 1.44MB, transferring files larger than this size was a big issue. ZIP was one of the formats that offered file compression and file spanning. For example, if you had a file of 3MB, you could zip it to, say, 2.5MB and inform the ZIP program to split the archive so that it could be transferred by floppy disks. The program would automatically create ZIP archives of 1.4MB and 1.1MB, you could then copy them to two floppies, and in the other computer, copy the files into the same directory and double click the first file to open the whole archive. This, as you can imagine, was a very handy feature. Now, you can instruct your ZIP program to create split archives of any size, say to fit in a CD. These split files have extensions of .z01, .z02 etc. The function to encrypt zip files with a password was also added.
To open a ZIP file in Linux, there are two options: you can go with the command line or you can go with a graphical program. Archive Manager or ARK can open the individual ZIP archives or split files without any problems: double click on the file and the default archive handling program will be opened. Click on the “Extract” button and the files can be unzipped to a directory of your choice.
Personally I find using the command line interface easier to handle. To work with ZIP files, you need to have the unzip package installed. If it is not installed, you can download and install it through your package manager. If everything is in place, change into the directory in which you have the zip file(s) and issue unzip package_name.zip. If there are split archives, they will be recognized and unpacked. If the ZIP file is password protected, then the command becomes unzip -Ppassword package_name.zip. Note that this can be insecure because someone can peek over your shoulder and learn your password.
Sometimes with split archives the unzip command may not complete its operation. If this is the case, 99% of the time opening the compressed archive with a graphical program such as Archive Manager will let you extract the files.