Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

7z

7-Zip high compression ratio tool

Syntax

7z [COMMAND] [OPTION]... ARCHIVE [FILE]...

Common Options

aAdd to archive
xExtract with full paths
eExtract without paths
lList archive contents
tTest integrity
dDelete from archive
uUpdate archive
-pSet password
-mx=9Maximum compression
-mhe=onEncrypt file headers
-rRecursive operation

Common Examples

7z a archive.7z files/

Create 7z archive

7z x archive.7z

Extract 7z archive

7z l archive.7z

List archive contents

7z a -psecret archive.7z files/

Encrypt archive

7z a -mx=9 archive.7z files/

Maximum compression

7z a -mhe=on -psecret archive.7z files/

Encrypt headers and content

7z t archive.7z

Test archive integrity

7z d archive.7z unwanted.txt

Delete from archive

Related Commands

Related Tools

More Code & Dev Tools