mirror of https://github.com/CrimsonTome/tldr.git
853 B
853 B
zip
Package and compress (archive) files into zip file.
- Package and compress a directory and its contents, [r]ecursively:
zip -r {{compressed.zip}} {{/path/to/dir}}
- Eclude unwanted files from being added to the compressed archive:
zip -r {{compressed.zip}} {{path/to/dir}} -x {{path/to/exclude}}
- Archive a directory and its contents with the highest level [9] of compression:
zip -r -{{9}} {{compressed.zip}} {{/path/to/dir}}
- Package and compress multiple directories and files:
zip -r {{compressed.zip}} {{/path/to/dir1 /path/to/dir2 /path/to/file}}
- Create an encrypted (password protected) archive:
zip -e -r {{compressed.zip}} {{path/to/dir}}
- Add files to an existing zip file:
zip {{compressed.zip}} {{path/to/file}}
- Delete files from an existing zip file:
zip -d {{compressed.zip}} "{{foo/*.tmp}}"