zip -r foo.zip foo -x "*.DS_Store"
To interpret this, we are running the zip executable with the following parameters/arguments:
-r
for recursively including all directories underneath the targets we want to zip.foo.zip
is the name of the zip archive we are creatingfoo
is the target directory we want to zip up-x "*.DS_Store"
excludes all files whose path ends in the string ".DS_Store"