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.
First, let's see the number of files present in our current directory example.
Now, we can compress this photos directory present in our current directory by using the following command
Now, check for the files present in the current directory, we will get a .zip file present there.
Following command is used to unzip the directory.
Zip command can be used with the various tags. To get all the details of such flags, we can ask for help.
This is how we can zip and unzip the files on MacOS.