Skip to content

Instantly share code, notes, and snippets.

@protrolium
Last active June 10, 2016 18:15
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 protrolium/e678ace37acf3f9a11d6870d0d8dd33d to your computer and use it in GitHub Desktop.
Save protrolium/e678ace37acf3f9a11d6870d0d8dd33d to your computer and use it in GitHub Desktop.
zip terminal command

zip a directory for windows by removing .DS_Store

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