What Is "zip" Command on Linux Systems


What Is "zip" Command on Linux Systems?

✍: FYIcenter.com


"zip" Command on Linux Systems allows you to package and compress files into a ZIP file.

1. You can use "man zip" to read its man page.

     zip  [-aABcdDeEfFghjklLmoqrRSTuvVwXyz!@$] [--longoption ...]  [-b path] 
     [-n suffixes] [-t date] [-tt date] [zipfile [file...]]  [-xi list]

     zip  is  a  compression and file packaging utility for Unix, VMS, 
     MSDOS, OS/2, Windows 9x/NT/XP, Minix, Atari, Macintosh,
     Amiga, and Acorn RISC OS.  It is analogous to a combination of the 
     Unix commands tar(1) and compress(1) and is compatible
     with PKZIP (Phil Katz's ZIP for MSDOS systems).

     A  companion program (unzip(1L)) unpacks zip archives.  The zip and 
     unzip(1L) programs can work with archives produced by
     PKZIP (supporting most PKZIP features up to PKZIP version 4.6), and 
     PKZIP and PKUNZIP can work with archives produced  by
     zip  (with  some exceptions, notably streamed archives, but recent 
     changes in the zip file standard may facilitate better
     compatibility).  zip version 3.0 is compatible with PKZIP 2.04 and 
     also supports the Zip64 extensions of PKZIP 4.5  which
     allow archives as well as files to exceed the previous 2 GB limit 
     (4 GB in some cases).  zip also now supports bzip2 com‐
     pression if the bzip2 library is included when zip is compiled.  
     Note that PKUNZIP 1.10 cannot extract files produced  by
     PKZIP 2.04 or zip 3.0. You must use PKUNZIP 2.04g or unzip 5.0p1 
     (or later versions) to extract them.


2. You can use "zip orders.zip orders/*" to add all files in the "orders" directory to the ZIP file, orders.zip.

3. You can use the "-r" option to included sub-directories recursively. For example, "zip -r orders.zip orders" adds all files under the "orders" directory tree.

4. You can use "-u" option to turn on the "update" mode, which only adds files that are not in the ZIP file or have newer dates.

5. You can use "-P" option to encrypt files with a password, while archiving them.


What Is "unzip" Command on Linux Systems

"zip/unzip" Commands on Linux Systems

"zip/unzip" Commands on Linux Systems

⇑⇑ ZIP - Frequently Asked Questions

2021-02-21, 729🔥, 0💬