| Option | Description |
|---|---|
| c | Create an archive |
| x | Extract an archive |
| t | List archive contents |
| f | Archive file name (must come right before it) |
| v | Verbose: show files being processed |
| z | gzip compression (.tar.gz) |
| j | bzip2 compression (.tar.bz2) |
| J | xz compression (.tar.xz) |
| --zstd | zstd compression (.tar.zst) |
| -C dir | Change to directory before extracting |
| --exclude=pattern | Skip files matching a pattern |
| Tool | Description |
|---|---|
| gzip | Fast, supported everywhere, moderate ratio |
| bzip2 | Better ratio than gzip but slow, mostly legacy |
| xz | Highest ratio, slow to compress, common for releases |
| zstd | Very fast with ratios near xz, best general choice |
| lz4 | Extremely fast, lower ratio, good for live pipes |