zip Command Generator
Generate zip commands to package and compress files
Getting Started with zip
## What is zip?
`zip` packages one or more files into a portable `.zip` archive with optional compression and password encryption. The first argument is always the output archive name, followed by the files or directories to add.
## How to Use
1. **Name the Archive**: the output `.zip` file (first argument). 2. **Add Paths**: files or directories to include (second argument onward). 3. **Toggle Flags**: `-r` for directories, `-e` to encrypt, `-q` for quiet. 4. **Copy & Run**: paste the generated command into your terminal.
Flags & Levels
zip merges flags and treats the level as a separate flag:
``` zip -r archive.zip dir/ zip -9 -e secret.zip report.pdf ```
### Common flags - `-r` — travel the directory structure recursively - `-e` — encrypt, prompts for a password - `-q` — quiet mode - `-0` … `-9` — compression level (`-0` stores uncompressed, `-6` default, `-9` best)
### Tips - Always use `-r` when adding a directory, otherwise only the top-level entries are stored. - `-e` encrypts the *entries*; the archive's file list is still visible unless you also hide names with `zipcloak`-style tooling. - `zip -0` is handy for already-compressed files (images, videos) where recompressing wastes time.
▶Why did my directory get added without its contents?
▶How do I create a password-protected zip?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee