knowledge/technology/applications/cli/compression/p7zip.md
2024-03-19 09:25:42 +01:00

950 B

obj aliases
application
7zip
7z

7Zip

7-Zip is a file archiver with the highest compression ratio. The program supports 7z (that implements LZMA compression algorithm), ZIP, CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format.

Usage

Add file/directory to the archive (or create a new one):

7z a archive_name file_name
7z a archive_name file_name -p -mhe=on # Password Protect

Update existing files in the archive or add new ones:

7z u archive_name file_name

List the content of an archive:

7z l archive_name

Extract files:

7z e archive_name # without using dir names
7z x archive_name # extract with full paths
7z x -ofolder_name archive_name # extract into folder

Check integrity of the archive:

7z t archive_name