How to Zip and Unzip directories in MacOS.

Introduction

Zip is an archive file format that supports lossless data compression. A .zip file may contain any number of compressed files. The format was created by Phil Katz in 1989. Zipping is extremely useful when it comes to transfer large amount of data. Most operating system has built in support for .zip in similar manners.

Zip Directory

First, let's see the number of files present in our current directory example.

How to Zip and Unzip directories in MacOS

Now, we can compress this photos directory present in our current directory by using the following command

  1. $ zip photos.zip photos  

How to Zip and Unzip directories in MacOS

Now, check for the files present in the current directory, we will get a .zip file present there.

How to Zip and Unzip directories in MacOSUnzip Directory

Following command is used to unzip the directory.

  1. $ unzip Photos.zip  

How to Zip and Unzip directories in MacOS

Extra Info

Zip command can be used with the various tags. To get all the details of such flags, we can ask for help.

  1. $ zip -help   

This is how we can zip and unzip the files on MacOS.



Contact Us logo Whatsapp