Zip and Unzip Linux Commands

In this post, you will find practical examples showing how to install and use the zip command to compact and organize files within your file system.

Zip is a compress tool which is available in most of the operating systems such as Linux/Unix, Apple OS, Microsoft OS etc.

Install zip and unzip command in Linux?

On Debian/Ubuntu, you can use the following commands to install zip/unzip:

On Redhat, Centos and Fedora based machines

List of Zip and Unzip Linux Commands

Syntax for zipping a file:

Syntax for zipping archive of several files:

The syntax for zipping a directory: Zipping a folder is a tricky thing as by default zip will not zip entire folder content such as subfolders and files. To zip with all files and subfolders we have to pass -r parameter, then it will recursively zip.

Syntax for zipping a files and folders:

Syntax for checking if a zipped archive is fine or not:

Syntax for unzipping a zip archive:

Syntax for Deleting a file in an archive with out extracting entire zip file:

Syntax for seeing the contents of a zip archive:

Syntax to extract a file from a zip archive:

Syntax to unzip a zip archive to a specific location:

Syntax to Updating all the files in zip file if the original files are modified:

Syntax to Updating a particular file which is modified and update our zip file with this update:

Syntax to exclude a file or folder in a folder when compressing it:

Syntax to compress fast :

To compress with better ratios use -9

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

One Comment

Leave a Reply

Your email address will not be published.