gzip Command Generator
Generate gzip commands to compress or decompress files
Getting Started with gzip
## What is gzip?
`gzip` compresses single files using the DEFLATE algorithm, replacing each input with a smaller `.gz` copy (the original is removed unless you keep it). It also decompresses with `-d`.
## How to Use
1. **Set the Level** (optional): `-1` (fastest) to `-9` (best); default is `-6`. 2. **Toggle Flags**: `-k` to keep originals, `-r` for recursive, `-d` to decompress. 3. **Name the File**: the file to compress. 4. **Copy & Run**: paste the generated command into your terminal.
Flags & Levels
gzip bundles short flags and treats the level as a separate flag:
``` gzip -9 bigfile gzip -kr logs/ gzip -dk archive.gz ```
### Common flags - `-1` … `-9` — compression level (fastest … best) - `-d` — decompress (same as gunzip) - `-k` — keep the original file - `-r` — operate recursively on directories - `-v` — verbose (print the compression ratio) - `-c` — write to standard output, keep the original
### Tips - For many small files, prefer `tar` + `gzip` over zipping each file. - `gzip -c file > out.gz` compresses to a chosen name without removing the source.
▶How do I keep the original file after compressing?
▶What level should I use?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee