Skip to content

Instantly share code, notes, and snippets.

@oclero
Last active November 8, 2025 00:37
Show Gist options
  • Select an option

  • Save oclero/80239e5b740aa658380bb39e1e98577b to your computer and use it in GitHub Desktop.

Select an option

Save oclero/80239e5b740aa658380bb39e1e98577b to your computer and use it in GitHub Desktop.
MacOS - Create a ZIP archive without .DS_Store and __MACOSX files
zip -rX output.zip path/to/input_folder -x ".DS_Store" -x "__MACOSX"
@tuckdesign
Copy link

This is wrong. You should just use '-X':
zip -rX output.zip path/to/input_folder

@oclero
Copy link
Author

oclero commented Nov 5, 2025

thank you! I'll try and edit the gist

@oclero
Copy link
Author

oclero commented Nov 8, 2025

Actually, -X still does include .DS_Store files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment