LinuxCommandLibrary

7za

standalone file archiver from the 7-Zip family

TLDR

Create archive

$ 7za a [archive.7z] [files...]
copy
Extract archive
$ 7za x [archive.7z]
copy
List archive contents
$ 7za l [archive.7z]
copy
Create zip archive
$ 7za a -tzip [archive.zip] [files]
copy
Extract with password
$ 7za x -p[password] [archive.7z]
copy

SYNOPSIS

7za command [switches] archive [files...]

DESCRIPTION

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, TAR, and XZ formats.
The command syntax is identical to 7z. For scripts that only need common formats, 7za is often preferred for its simplicity and reliability.

PARAMETERS

-odir

Output directory
-ppassword
Set password
-mx=n
Compression level (0-9)
-ttype
Archive type (7z, zip, gzip, bzip2, tar)
-r
Recurse subdirectories
-y
Assume yes to queries

COMMANDS

a

Add files to archive
x
Extract with full paths
e
Extract (flat, no paths)
l
List archive contents
t
Test archive integrity
d
Delete from archive
u
Update archive

CAVEATS

7za supports fewer formats than 7z. For RAR, CAB, or ISO extraction, use the full 7z command.
The "a" in 7za stands for "alone" (standalone), not "alpha" or "advanced".
Performance is identical to 7z for supported formats.

SEE ALSO

7z(1), 7zr(1), tar(1), gzip(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard