unzip takes the files out of a .zip file and puts them in the folder you’re in, keeping the folders they were stored in.
Every command and output on this page is real, run in Terminal with zsh 5.9 and UnZip 6.00 on macOS 26.
Syntax
unzip file.zip
unzip: the command that unpacks a zip file.file.zip: the zip file to unpack.
See UnZip (opens in a new tab) on the Info-ZIP site, the makers of unzip.
The Example
A zip file named photos.zip that holds a folder named photos with three files.
Step 1: Unzip the File
unzip photos.zip
Archive: photos.zip
creating: photos
extracting: photos/notes.txt
extracting: photos/trip-2026.jpg
extracting: photos/trip-2025.jpg
creating is a folder it made, and each extracting is a file it took out.
Step 2: Look at the Files
ls photos
notes.txt trip-2025.jpg trip-2026.jpg
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Unzipping again where the files already are | unzip asks replace photos/notes.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: | Type N to keep the files you have, or A to replace them all |
FAQ
Where do the files go?
Into the folder you’re in, with the same folders they had inside the zip.
Conclusion
Type unzip and the file’s name in the folder where the files should go.
Additional Resources
- UnZip (opens in a new tab) (Info-ZIP)
macOS is a trademark of Apple Inc.
0 comments