tldr/pages/common/zip.md
Waldir Pimenta f3ba0e6086 Clarify -x option
This also makes it easier to understand what `-x` means (eXclude)
2016-02-21 13:31:36 +00:00

518 B

zip

Package and compress (archive) files into zip file.

  • Package and compress multiple directories and files:

zip -r {{compressed.zip}} {{/path/to/dir1 /path/to/dir2 /path/to/file}}

  • Add files to an existing zip file:

zip {{compressed.zip}} {{path/to/file}}

  • Remove unwanted files from an existing zip file:

zip -d {{compressed.zip}} "{{foo/*.tmp}}"

  • Exclude unwanted files from being added to the compressed archive:

zip -r {{compressed.zip}} {{path/to/dir}} -x \*.git\* \*node_modules\* ...