7z(1)

okay so bestie, you've found 7z(1) โ€” the manpage from the General Commands Manual for the 7-Zip file archiver, aka the compression tool with a high compression ratio that absolutely ate. grab a snack, we're going through the whole thing ๐Ÿ“

โœจ NAME โœจ

7z โ€” 7-Zip file archiver with a high compression ratio


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

like, here's the shape of every single call, and yes there are four flavors:

7z command [switches...] archive_name [file_names] [@listfile]

7zz command [switches...] archive_name [file_names] [@listfile]

7za command [switches...] archive_name [file_names] [@listfile]

7zr command [switches...] archive_name [file_names] [@listfile]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

7-Zip file archiver with a high compression ratio โœจ

so here's the tea: there are several variants of the 7z executable, and they are not all the same girlie. let me introduce them:

  • 7z โ€” full featured with plugin support ๐Ÿ‘‘ the main character, plugins and all.
  • 7zz โ€” full featured single binary executable with no plugins support. same full-featured energy, but it's one single binary and plugins said bye ๐Ÿ™ˆ
  • 7za โ€” supports major formats only, no plugins, but smaller executable size. lowkey the compact queen ๐ŸŽ€
  • 7zr โ€” only supports LZMA codec and related formats (7z, lzma, xz), no plugins, but smallest executable size. tiniest of them all, literally ๐Ÿ’€

๐Ÿ”ฅ OPTIONS ๐Ÿ”ฅ

๐Ÿ’œ Commands ๐Ÿ’œ

these are the vibes โ€” pick one, it's the thing you're actually doing:

  • a โ€” Add files to archive ๐Ÿซถ
  • b โ€” Benchmark (a little performance moment, no archive needed)
  • d โ€” Delete files from archive
  • e โ€” Extract files from archive (without using directory names โ€” yes, it flattens, she's messy like that)
  • h โ€” Calculate hash values for files ๐Ÿ”
  • i โ€” Show information about supported formats (the info dump you need)
  • l โ€” List contents of archive
  • rn โ€” Rename files in archive
  • t โ€” Test integrity of archive (vibe check on your archive, fr fr)
  • u โ€” Update files to archive
  • x โ€” eXtract files with full paths (the one that keeps the directory structure, we stan ๐ŸŒธ)

๐Ÿ’… Switches ๐Ÿ’…

all the little modifiers, in order, nothing skipped, no cap:

  • -- โ€” Stop switches and @listfile parsing ๐Ÿ›‘
  • -ai[r[-|0]]{@listfile|!wildcard} โ€” Include archives
  • -ax[r[-|0]]{@listfile|!wildcard} โ€” eXclude archives
  • -ao{a|s|t|u} โ€” set Overwrite mode
  • -an โ€” disable archive_name field
  • -bb[0-3] โ€” set output log level
  • -bd โ€” disable progress indicator (no lil progress bar for you)
  • -bs{o|e|p}{0|1|2} โ€” set output stream for output/error/progress line
  • -bt โ€” show execution time statistics โฑ๏ธ
  • -i[r[-|0]]{@listfile|!wildcard} โ€” Include filenames
  • -m{Parameters} โ€” set compression Method ๐Ÿ—œ๏ธ and the sub-params are:
    • -mmt[N] โ€” set number of CPU threads
    • -mx[N] โ€” set compression level: -mx1 (fastest) ... -mx9 (ultra)
  • -o{Directory} โ€” set Output directory
  • -p{Password} โ€” set Password ๐Ÿ”‘
  • -r[-|0] โ€” Recurse subdirectories for name search
  • -sa{a|e|s} โ€” set Archive name mode
  • -scc{UTF-8|WIN|DOS} โ€” set charset for console input/output
  • -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} โ€” set charset for list files
  • -scrc[CRC32|CRC64|SHA1|SHA256|*] โ€” set hash function for x, e, h commands
  • -sdel โ€” delete files after compression ๐Ÿ—‘๏ธ
  • -seml[.] โ€” send archive by email ๐Ÿ“ง
  • -sfx[{name}] โ€” Create SFX archive
  • -si[{name}] โ€” read data from stdin
  • -slp โ€” set Large Pages mode
  • -slt โ€” show technical information for l (List) command
  • -snh โ€” store hard links as links
  • -snl โ€” store symbolic links as links
  • -sni โ€” store NT security information
  • -sns[-] โ€” store NTFS alternate streams
  • -so โ€” write data to stdout
  • -spd โ€” disable wildcard matching for file names
  • -spe โ€” eliminate duplication of root folder for extract command
  • -spf โ€” use fully qualified file paths
  • -ssc[-] โ€” set sensitive case mode
  • -sse โ€” stop archive creating, if it can't open some input file
  • -ssp โ€” do not change Last Access Time of source files while archiving
  • -ssw โ€” compress shared files
  • -stl โ€” set archive timestamp from the most recently modified file
  • -stm{HexMask} โ€” set CPU thread affinity mask (hexadecimal number)
  • -stx{Type} โ€” exclude archive type
  • -t{Type} โ€” Set type of archive
  • -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] โ€” Update options
  • -v{Size}[b|k|m|g] โ€” Create volumes
  • -w[{path}] โ€” assign Work directory. Empty path means a temporary directory
  • -x[r[-|0]]{@listfile|!wildcard} โ€” eXclude filenames
  • -y โ€” assume Yes on all queries ๐Ÿ™ˆ (extremely "just say yes and don't ask me again" energy)

๐ŸŒˆ SEE ALSO ๐ŸŒˆ


Copyright ยฉ 1999-2023 Igor Pavlov.

Distributed under the LGPL-2.1+ license.


and that's the whole page, bestie, you're basically a 7-Zip scholar now ๐Ÿ’…โœจ this was version 22.01, dated May 2023 โ€” so if anyone asks, that's the era we're living in ๐ŸŽ€

๐Ÿ“ฆ where this page comes from