How to Zip Files in Mac OS X
Ever wondered how to make a zip file in Mac OS X? We recently demonstrated how to password protect zip archives, but in the comments a reader asked a more simple yet completely valid question: “what about just making a standard zip file?”
Well, making a zip archive on a Mac is easy, and with the compression tools built directly into Mac OS X there is no need to download additional software or add-ons to quickly create zips and compress either a single file, a group of files, or an entire folder. If you’re unfamiliar with creating zips on the Mac, here is exactly how to do it, and quickly.
How to Make a Zip Archive in Mac OS X
You can use this to create zip files of files, folders, or both:
- Locate the items to zip in the Mac Finder (file system)
- Right-click on a file, folder, or files you want to zip
- Select “Compress Items”
- Find the newly created .zip archive in the same directory
If a single file is being zipped, the zip archive will maintain the standard file name but append the .zip extension.
If more than one file is being zipped, the archive will be named “Archive.zip”, and if multiple archives are created, they will be named successively “Archive 2.zip” and so on.
This works in all versions of Mac OS X, and you can access the compress item option from a right-click with a mouse, control-click with keyboard, or two-finger click on a trackpad from the Mac.
Extracting Zip Archives
Opening zip files is even easier, all you need to do is just double-click on the archive and it will expand automatically with Archive Utility in the same folder the archive is stored in.
For example, if you’re extracting an archive named “ZippedSample.zip” in the ~/Downloads/ directory, the resulting extracted folder would be named “ZippedSample” within that same ~/Downloads/ directory.
How to Create a Zip from the Command Line on Mac
Not interested in using the standard Finder and file system approach? Zip archives can also be created from the command line by using the terminal command ‘zip’ with the following syntax:
zip archive.zip file.txt
Another simple way to create an archive from the command line is to use the Terminal’s drag & drop support, type out ‘zip’ as usual but then drop in the file(s) to compress into the Terminal window.
Unzipping from the command line is also very simple, with the easy ‘unzip’ command:
unzip archive.zip
You can specify paths and other details if interested, but if all you’re looking to do is extract a file there isn’t much more to do than the simple unzip command.
While it’s good to know the command line alternatives, most users are best served using the friendlier Mac Finder based approaches, either with zipping from the right-click method described above, or unzipping by just opening the file directly.
I tried to compress my ppt file, but it just reduced the size from 59MB to 47MB. Is there a better way to compress more so that I can send by email? Thanks a lot!
Great! thank you very much, very easy to understand.
Good article but you started out with “We recently demonstrated how to password protect zip archives…” so how do you right-click compress with encryption/password protection?
What program (ie, terminal command) is executed for right-click compress? (I know I can use zip, tar, etc.)
[I may have to write a service/script to compress with encryption like zip can do.]
I was able to zip my file but its didn’t make it smaller in size? Any thoughts?
Same here. If anyone could come up with a solution, that’d be great.
The amount of compression you get depends on the data. Some data is already so compact that compressing just doesn’t do much.
MS Office 2007 and above use XML for the documents which is already very compact so compression may not save you much.
Think of some data as liquids which are basically not compressible (unless there is air or something else compressible within it) versus gasses like the air we breath which can be compressed in a scuba tank, or solids like lava, wood or a crumpled newspaper which has a lot of gas bubbles/pockets in it and can be compressed. Steel is already pretty compact so you won’t get much by compressing it.
Please help me. I’ve an iPhone 6 running iOS 9.3 and MacBook Air 11″ running Mac OS X 10.11. I’m unable to exchange files between them using AirDrop. I can exchange files with my mom’s iPhone 6S Plus running iOS 9.2.1. Please help me.
What do you do when you compress files into a zip file and you email it and it doesn’t go through because it says file is too large ?
[…] extract it to find out? Maybe you are hunting around in a see of archives for a specific file you zipped up a while ago, but you’re not quite sure which archive contains it? You can easily peer into […]
[…] to exclude many specific files or a group of matched files from a zip archive is by skipping the easy zipping utility built into Mac OS X’s friendly UI and turn over to the command line, where the powerful zip […]
[…] will now be able to extract and create archives as usual […]
Thanks, I needed these simple instructions! I used to use Stuffit, but now I can just right click. Great!
Thank you for your article. I am a college student and have bought my very first Mac lab top. Your article was very useful for me always being a windows user.
Thank you very much!
[…] app name you want the crash reports from, copy that out of the folder, or copy multiple logs and zip them up for the […]
[…] probably familiar with making your own zip files if you’ve ever needed to transfer a group of files or if you’re managing your own […]
[…] Newly extracted archives will now delete themselves, making this a perfect solution for those of us who don’t want a Downloads folder full of leftover .zip files. […]
Sorry… a typo.
-rf (–datafork) should be:
-df (–datafork)
@Henning
You can try adding -rf (–datafork)
zip -df foo.zip foo.txt
To exclude certain files. Use: -x “xxxx”
For your example it would be:
zip foo.zip foo.txt -x “*__MACOSX”
(the quotes (“) are ⇧+2 incase this comment field transforms them into something else. :))
If you zip a folder? you can add -r … zip -r foo.zip foo … to include subfolders.
In terminal type: man zip
to bring up the zip manual.
@Hipolito
You can try:
zip yourbigfile.zip –out smallzips.zip -s 10m
That is for 10mb files like: smallzips.zip smallzips.z01 smallzips.z02
But you could use another compression to make smaller file instead. Look at tar gzip bzip etc. 1 file is always better that 2.
You should publish something more useful…Instead of how to create a ZIP file why not “how to create a splitted ZIP file” which is sometimes needed (Try to upload a file bigger than 100Mb to M$ Skydrive)….
Is it possible to create a Zip-Archiv without the hidden MACOSX Folder?
Greetings Henning
Pretty useless, though. 4,125,328 bytes compressed to 3,998,283 bytes
Same here! what did you do?
Seriously?
Need a post “How to create new Folder in Mac OS”
Command+N
THANK YOU! LIFE SAVER AT 12:33 am!!
You know everything, you are amazing!
Welp OS XDaily, you better shut down your website, ArtFeel knew this one!
LOLZ