Skip to content

Instantly share code, notes, and snippets.

@mauryaratan
Created February 14, 2013 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauryaratan/4956369 to your computer and use it in GitHub Desktop.
Save mauryaratan/4956369 to your computer and use it in GitHub Desktop.
Compress your files without including .DS_Store with single line command.
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 creating
foo is the target directory we want to zip up
-x "*.DS_Store" excludes all files whose path ends in the string ".DS_Store"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment