Easy Tutorial
❮ Linux Comm Egrep Linux Comm Touch ❯

Linux zip Command

Linux Command Manual

The Linux zip command is used to compress files.

zip is a widely used compression program, and the compressed files have a .zip suffix.

Syntax

zip [-AcdDfFghjJKlLmoqrSTuvVwXyz$][-b &lt;working directory>][-ll][-n &lt;suffix string>][-t &lt;date time>][-&lt;compression efficiency>][compressed files][files...][-i <pattern>][-x <pattern>]

Parameters:

Example

Compress all files and folders in the /home/html directory into html.zip in the current directory:

zip -q -r html.zip /home/html

If we are in the /home/html directory, we can execute the following command:

zip -q -r html.zip *

Delete the file a.c from the compressed file cp.zip:

zip -dv cp.zip a.c

Linux Command Manual

❮ Linux Comm Egrep Linux Comm Touch ❯