How do you zip files in Terminal or Unix on Mac OS 10.2?

Answer

To zip just one file (file.txt) to a zipfile (zipfile.zip), type the following:

zip zipfile.zip file.txt

To zip an entire directory:

zip -r zipfile.zip directory

For more advanced options, check the man page of zip:

man zip

Improve Answer Discuss the question "How do you zip files in Terminal or Unix on Mac OS 10.2?" Watch Question

First answer by Pecunia. Last edit by Pecunia. Contributor trust: 40 [recommend contributor]. Question popularity: 31 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Software and Applications > Operating Systems > Apple and Mac > How do you zip files in Terminal or Unix on Mac OS 10.2?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
How do you zip a file in unix?  How do you zip folders in UNIX?