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