7-Zip Manual

Documents 7-Zip 26.04

All documents
Start and general
  • 7-Zip Start Page
  • General Information
  • 7z Format
  • Frequently Asked Questions (FAQ)
  • Supported formats
  • License for use and distribution
  • Performance
  • Thanks
File Manager
  • 7-Zip File Manager
  • About Dialog Box
  • Benchmark
  • Menu Items and Shortcut Keys
  • Options Dialog Box
  • Delete Temporary Files
File Manager plugins
  • 7-Zip Plugin
  • Plugins
  • Add to Archive Dialog Box
  • Extract Dialog Box
Command line: overview
  • Command Line Version User's Guide
  • Exit Codes from 7-Zip
  • Command Line Syntax
Command line: commands
  • Command Line Commands
  • a (Add) command
  • b (Benchmark) command
  • d (Delete) command
  • e (Extract without folders) command
  • x (Extract with full paths) command
  • h (Hash) command
  • l (List contents of archive) command
  • rn (Rename) command
  • t (Test integrity of archive) command
  • u (Update) command
Command line: switches
  • Command Line Switches
  • -ax (Exclude archive filenames) switch
  • -ai (Include archive filenames) switch
  • -an (Disable parsing of archive_name) switch
  • -bb (Set output log level) switch
  • -bs (Set output stream for output/error/progress line) switch
  • -scs (Set charset for list files) switch
  • -seml (Send archive by email) switch
  • -x (Exclude filenames) switch
  • -i (Include filenames) switch
  • -slp (Set Large Pages mode) switch
  • -slt (Show technical information) switch
  • -m (Set compression Method) switch
  • -o (set Output directory) switch
  • -ao (Overwrite mode) switch
  • -p (set Password) switch
  • -r (Recurse subdirectories) switch
  • -sa (set Archive name mode) switch
  • -scc (Set charset for console input/output) switch
  • -scrc (Set hash function) switch
  • -sdel (Delete files after including to archive) switch
  • -sfx (Create SFX archive) switch
  • -ssw (Compress files open for writing) switch
  • -sni (Store NT security information) switch
  • -sns (Store NTFS alternate Streams) switch
  • -spf (Use fully qualified file paths) switch
  • -spm (Require path separator mark for directory path) switch
  • -ssc (Set Sensitive Case mode) switch
  • -si (read data from stdin) switch
  • -so (write data to stdout) switch
  • -stl (Set archive timestamp from the most recently modified file) switch
  • -- (Stop switches parsing) switch
  • -stx (Exclude archive type) switch
  • -t (set Type of archive) switch
  • -u (Update options) switch
  • -v (Create Volumes) switch
  • -w (set Working directory) switch
  • -y (assume Yes on all queries) switch
Text files
  • 7zC.txt
  • 7zFormat.txt
  • License.txt
  • Methods.txt
  • copying.txt
  • lzma.txt
  • readme.txt
  • src-history.txt
  • unRarLicense.txt
  1. 7-Zip Manual
  2. Start and general
  3. General Information

General Information

The main features of 7-Zip

  • Powerful file manager
  • High compression ratio and high speed
  • Big number of supported archive formats
  • Additional command line version

See Also

  • License for use and distribution

Notes from this site

Not part of the 7-Zip manual. Written by this site; examples checked with 7-Zip 26.04.

Which format should I choose?

GoalFormatCreateExtract
Smallest file7z7z a a.7z dir/7z x a.7z -oOUT
Encrypted, names hidden7z7z a -p -mhe=on a.7z dir/7z x a.7z -oOUT (asks for the password)
Recipient may not have 7-Zipzip7z a -tzip a.zip dir/7z x a.zip -oOUT
Linux or tar toolstar.gz or tar.xzsee belowsee below

The default format is 7z. gzip, xz and bzip2 hold one stream, so a folder needs a tar first. On Linux and macOS the official console program is 7zz. Zip keeps file names visible even with a password. Free to use in a company; no registration or payment (the manual's FAQ, license).

tar.gz and tar.xz in one command

7z a -ttar -so dummy.tar dir/ | 7z a -tgzip -si dir.tar.gz   # create .tar.gz
7z a -ttar -so dummy.tar dir/ | 7z a -txz -si dir.tar.xz     # create .tar.xz
7z x dir.tar.gz -so | 7z x -si -ttar -oOUT                   # extract either one
tar czf dir.tar.gz dir/                                      # system tar: keeps owner and group

With -so the first name (dummy.tar) is only a placeholder. Without -so, 7-Zip takes dir/ as the archive name and adds the current folder instead (tested). Two-step version: supported formats. See -so.

Permissions and links

In a macOS test, tar, zip and 7z archives all restored permission bits (a mode 755 script stayed executable, a 600 file stayed 600). A symbolic link is stored as a copy of its target unless you add -snl, which the manual lists for tar and WIM only. Owner and group were not kept: the tar listing showed User ID 0 and no names. For Linux backups where owner and group matter, use your system's tar czf; 7-Zip is fine when permission bits are enough. Test a restore either way.

Related pages

  • Supported formats: what can be created and what is read-only
  • 7z format: methods and AES-256 encryption
  • FAQ and start page
Previous7-Zip Start PageNext7z Format

This is an unofficial mirror of the 7-Zip documentation. This site is not affiliated with, endorsed by, or sponsored by 7-Zip or its authors. The documentation (7-Zip 26.04) is copyright © 1999-2026 Igor Pavlov and any other rights holders, and is licensed under the GNU LGPL.

Source: 7-zip.org (downloads and current release). The 7-Zip text is unmodified; only the page layout is changed. Boxes titled “Notes from this site” are written by this site and are not part of the 7-Zip manual.