Linux command
7za 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Create archive
7za a [archive.7z] [files...]
Extract archive
7za x [archive.7z]
List archive contents
7za l [archive.7z]
Create zip archive
7za a -tzip [archive.zip] [files]
Extract with password
7za x -p[password] [archive.7z]
说明
7za is the standalone version of the 7-Zip command-line tool. Unlike 7z which may use external plugins, 7za includes all codecs in a single executable. 7za supports fewer formats than the full 7z but is more portable as a single binary. It handles 7z, ZIP, GZIP, BZIP2, XZ, TAR, and CAB formats. The command syntax is identical to 7z. For scripts that only need common formats, 7za is often preferred for its simplicity and reliability.
参数
- -o_dir_
- Output directory
- -p_password_
- Set password
- -mx=_n_
- Compression level (0-9)
- -t_type_
- Archive type (7z, zip, gzip, bzip2, xz, tar)
- -r
- Recurse subdirectories
- -y
- Assume yes to queries
- -si
- Read from stdin
- -so
- Write to stdout
- -mhe=on
- Encrypt archive headers (7z format)
FAQ
What is the 7za command used for?
7za is the standalone version of the 7-Zip command-line tool. Unlike 7z which may use external plugins, 7za includes all codecs in a single executable. 7za supports fewer formats than the full 7z but is more portable as a single binary. It handles 7z, ZIP, GZIP, BZIP2, XZ, TAR, and CAB formats. The command syntax is identical to 7z. For scripts that only need common formats, 7za is often preferred for its simplicity and reliability.
How do I run a basic 7za example?
Run `7za a [archive.7z] [files...]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o_dir_ do in 7za?
Output directory