All Modules / Module 10 / Lesson 4 of 6

File cleanup

3 minute read

Create Zip Files Instantly

Right-clicking to compress in Finder works, but Terminal is faster and gives you more control.

The Commands

1

Zip a folder:

zip -r archive.zip foldername
2

Unzip a file:

unzip archive.zip
3

Zip multiple folders at once:

zip -r backup.zip folder1 folder2 folder3

Key Takeaway

zip -r creates archives. The -r means "recursive" — include everything inside folders.