2014-01-28 11:47:32 +04:00
|
|
|
# zip
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
> Package and compress (archive) files into zip file.
|
2014-01-28 11:47:32 +04:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Package and compress multiple directories and files:
|
2014-01-28 11:47:32 +04:00
|
|
|
|
2014-01-28 16:08:30 +04:00
|
|
|
`zip -r {{compressed.zip}} {{/path/to/dir1 /path/to/dir2 /path/to/file}}`
|
2015-12-28 19:51:04 +03:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Add files to an existing zip file:
|
2015-12-28 19:51:04 +03:00
|
|
|
|
|
|
|
`zip {{compressed.zip}} {{path/to/file}}`
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Remove unwanted files from an existing zip file:
|
2015-12-28 19:51:04 +03:00
|
|
|
|
|
|
|
`zip -d {{compressed.zip}} "{{foo/*.tmp}}"`
|
2016-02-20 06:59:18 +03:00
|
|
|
|
2016-02-21 16:31:36 +03:00
|
|
|
- Exclude unwanted files from being added to the compressed archive:
|
2016-02-20 06:59:18 +03:00
|
|
|
|
2016-02-21 16:31:36 +03:00
|
|
|
`zip -r {{compressed.zip}} {{path/to/dir}} -x \*.git\* \*node_modules\* ...`
|