.TH 7za 1 "March 6th, 2016" "7-Zip" .SH NAME 7za \- A file archiver with high compression ratio format .SH SYNOPSIS .B 7za .B .RB [ "... ]" .B .RB [ "... ]" .RB [ <@listfiles> "... ]" .PP .SH DESCRIPTION 7-Zip is a file archiver supporting 7z (that implements LZMA compression algorithm featuring very high compression ratio), LZMA2, XZ, ZIP, Zip64, CAB, RAR (if the non-free p7zip-rar package is installed), ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem images and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format. .PP .B 7za is a stand-alone executable. .B 7za handles fewer archive formats than .BR 7z (1). .SH COMMANDS .TP .B a Add files to archive .TP .B b Benchmark .TP .B d Delete files from archive .TP .B e Extract files from archive (without using directory names) .TP .B h Calculate hash values for files .TP .B i Show information about supported formats .TP .B l List contents of archive .TP .B rn Rename files in archive .TP .B t Test integrity of archive .TP .B u Update files to archive .TP .B x eXtract files with full paths .PP .SH SWITCHES .TP .B \-\- Stop switches parsing .TP .B \-ai[r[-|0]]{@listfile|!wildcard} Include archives .TP .B \-ax[r[-|0]]{@listfile|!wildcard} Exclude archives .TP .B \-ao{a|s|t|u} Set Overwrite mode .TP .B \-an Disable archive_name field .TP .B -bb[0-3] Set output log level .TP .B \-bd Disable progress indicator .TP .B \-bs{o|e|p}{0|1|2} Set output stream for output/error/progress line .TP .B \-bt Show execution time statistics .TP .B \-i[r[\-|0]]{@listfile|!wildcard} Include filenames .TP .B \-m{Parameters} Set Compression Method (see /usr/share/doc/p7zip/DOC/MANUAL/cmdline/switches/method.htm from the p7zip-full package for a list of methods) .TP .B \-o{Directory} Set Output directory .TP .B \-p{Password} Set Password (NOTE: this flag does not work with 7zr) .TP .B \-r[\-|0] Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it) .TP .B \-sa{a|e|s} Set archive name mode .TP .B \-scc{UTF\-8|WIN|DOS} Set charset for for console input/output .TP .B \-scs{UTF\-8|UTF\-16LE|UTF\-16BE|WIN|DOS|{id}} Set charset for list files .TP .B \-scrc[CRC32|CRC64|SHA1|SHA256|*] Set hash function for x, e, h commands .TP .B \-sdel Delete files after compression .TP .B \-seml[.] Send archive by email .TP .B \-sfx[{name}] Create SFX archive .TP .B \-si[{name}] Read data from stdin (e.g. tar cf \- directory | 7za a \-si directory.tar.7z) .TP .B \-slp Set Large Pages mode .TP .B \-slt Show technical information for l (List) command .TP .B \-snh Store hard links as links .TP .B \-snl Store symbolic links as links .TP .B \-sni Store NT security information .TP .B \-sns[\-] Store NTFS alternate streams .TP .B \-sfx[{name}] Create SFX archive .TP .B \-so Write data to stdout (e.g. 7za x \-so directory.tar.7z | tar xf \-) .TP .B \-spd Disable wildcard matching for file names .TP .B \-spe Eliminate duplication of root folder for extract command .TP .B \-spf Use fully qualified file paths .TP .B \-ssc[\-] Set sensitive case mode .TP .B \-ssw Compress shared files .TP .B \-stl Set archive timestamp from the most recently modified file .TP .B \-stm{HexMask} Set CPU thread affinity mask (hexadecimal number) .TP .B \-stx{Type} Exclude archive type .TP .B \-t{Type} Set type of archive .TP .B \-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] Update options .TP .B \-v{Size}[b|k|m|g] Create volumes .TP .B \-w[path] Set working directory. Empty path means a temporary directory .TP .B \-x[r[\-|0]]]{@listfile|!wildcard} Exclude filenames .TP .B \-y Assume Yes on all queries .PP .SH DIAGNOSTICS 7-Zip returns the following exit codes: .RS .IP 0 Normal (no errors or warnings detected) .IP 1 Warning (Non fatal error(s)). For example, some files cannot be read during compressing, so they were not compressed .IP 2 Fatal error .IP 7 Bad command line parameters .IP 8 Not enough memory for operation .IP 255 User stopped the process with control-C (or similar) .SH Backup and limitations DO NOT USE the 7-zip format for backup purpose on Linux/Unix because : \- 7-zip does not store the owner/group of the file. .LP On Linux/Unix, in order to backup directories you must use tar : \- to backup a directory : tar cf \- directory | 7za a \-si directory.tar.7z \- to restore your backup : 7za x \-so directory.tar.7z | tar xf \- If you want to send files and directories (not the owner of file) to others Unix/MacOS/Windows users, you can use the 7-zip format. example : 7za a directory.7z directory .LP Do not use "\-r" because this flag does not do what you think. .LP Do not use directory/* because of ".*" files (example : "directory/*" does not match "directory/.profile") .SH EXAMPLE 1 .TP .B 7za a \-t7z \-m0=lzma \-mx=9 \-mfb=64 \-md=32m \-ms=on archive.7z dir1 adds all files from directory "dir1" to archive archive.7z using "ultra settings" .TP .B \-t7z 7z archive .TP .B \-m0=lzma lzma method .TP .B \-mx=9 level of compression = 9 (Ultra) .TP .B \-mfb=64 number of fast bytes for LZMA = 64 .TP .B \-md=32m dictionary size = 32 megabytes .TP .B \-ms=on solid archive = on .SH EXAMPLE 2 .TP .B 7za a \-sfx archive.exe dir1 add all files from directory "dir1" to SFX archive archive.exe (Remark : SFX archive MUST end with ".exe") .SH EXAMPLE 3 .TP .B 7za a \-mhe=on \-pmy_password archive.7z a_directory add all files from directory "a_directory" to the archive "archive.7z" (with data and header archive encryption on) .SH "SEE ALSO" .BR 7zr (1), .BR 7z (1), .BR p7zip (1), .BR bzip2 (1), .BR gzip (1), .BR zip(1), .PP .SH "HTML Documentation" /usr/share/doc/p7zip-full/DOC/MANUAL/start.htm .SH AUTHOR .TP Written for Debian by Mohammed Adnene Trojette. Updated by Robert Luberda.