ZIP is a popular compressed archive format available on Linux, Mac, and Windows. It isn't as commonly used as gzip or bzip2 on Linux but is useful when distributing data to other platforms.
Archiving and compressing with zip
How to do it...
- The following syntax creates a zip archive:
$ zip archive_name.zip file1 file2 file3...
Consider this example:
$ zip file.zip file
Here, the file.zip file will be produced.
- The -r flag will archive folders recursively:
$ zip -r archive.zip folder1 folder2
- The unzip command will extract files and folders from a ZIP file:
$ unzip file.zip
The unzip command extracts the contents without removing the archive (unlike unlzma or gunzip).
- The -u flag updates files in the archive with newer...