p7zip(1)
๐ p7zip โ the manual, bestie edition ๐
Okay so picture this: it's the General Commands Manual, and the star of the show is p7zip</p7zip>... wait no, <pink>p7zip</pink> โ a lil wrapper sitting on top of the 7-Zip file archiver, and the whole point of it is a compression ratio so high it's giving overachiever. ๐
โจ NAME โจ
p7zip โ a wrapper on the 7-Zip file archiver, and it has a high compression ratio. That's it, that's the name. ๐ซถ
โจ SYNOPSIS โจ
p7zip [-c|--stdout|--to-stdout] [-d|--decompress|--uncompress]
[-f|--force] [-h|--help] [-k|--keep] [--] [file ...]
โจ DESCRIPTION โจ
So 7-Zip is a file archiver, right? And it supports a whole roster of formats, no cap:
7zโ and this one implements the LZMA compression algorithm, which features a very high compression ratio ๐LZMA2XZZIPZip64CABRARโ but only if the non-freep7zip-rarpackage is installed, just so you know ๐ซฃARJGZIPBZIP2TARCPIORPMISO- most filesystem images
DEB
And the compression ratio in the new 7z format? It's 30-50% better than the ratio in ZIP format. Ate. Periodt. ๐ฅ
Now โ p7zip itself is a gzip-like CLI wrapper script for 7-Zip. It handles only the 7z format (which is the native format of 7-Zip, iykyk), and internally it executes either 7za(1) or 7zr(1). So it's the friendly face, and those are the ones actually doing cardio behind the scenes. ๐โ๏ธ
Here's how it actually behaves, bestie:
- If you pass no switches on the command line, each given file argument gets compressed into
file.7z, and then it gets removed. Gone. Deleted. Bye. ๐ญ - If you pass the
-dswitch, then each file you pass needs to end with the.7zextension, and it gets decompressed. After the decompression, the original file is removed โ unless it contained more than one archived file. (So multi-file archives get to stay. Main character energy. ๐) - If you use it with no file argument at all,
p7zipreads data from the standard input and compresses it (or decompresses it, in the case of-d) into the standard output. Stream queen behavior. ๐
โจ SWITCHES โจ
-c,--stdout,--to-stdoutโ Write output on standard output. โจ-d,--decompress,--uncompressโ Decompress file. ๐ฆ-f,--forceโ Skip some checks and force compression or decompression. (It's giving "I said what I said.") ๐-h,--helpโ Print usage. ๐ธ-k,--keepโ Do not delete input file. Protect the file at all costs. ๐ฅบ--โ Treat all subsequent arguments as file names, even if they start with a dash. So no, that weirdly-named file is not a secret option. ๐
โจ SEE ALSO โจ
7z(1), 7za(1), 7zr(1), bzip2(1), gzip(1), zip(1)
(the whole friend group ๐ซถ go say hi)
โจ AUTHOR โจ
Written for Debian by Mohammed Adnene Trojette. Updated by Robert Luberda. Legends, honestly. ๐
And that's the whole page, bestie!! This one came from the 7-Zip crew and it's dated March 6th, 2016 โ so go forth, compress things, and remember: -k if you're emotionally attached. ๐๐ฆโจ
๐ฆ where this page comes from
- debian bookworm: p7zip 16.02+really26.01+dfsg-0+deb12u1 ยท LGPL-2.1-or-later
- debian bookworm: p7zip 16.02+really26.02+dfsg-0+deb12u1 ยท LGPL-2.1-or-later
- debian trixie: 7zip 25.01+dfsg-1~deb13u2 ยท LGPL-2.1-or-later
- ubuntu jammy: p7zip 16.02+dfsg-8 ยท LGPL-2.1-or-later
- ubuntu noble: 7zip 23.01+dfsg-11 ยท LGPL-2.1-or-later
- ubuntu questing: 7zip 25.01+dfsg-2
- ubuntu resolute: 7zip 26.00+dfsg-1 ยท LGPL-2.1-or-later
- ubuntu stonking: 7zip 26.02+dfsg-2 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms