knowledge/technology/applications/cli/compression/p7zip.md

36 lines
950 B
Markdown
Raw Normal View History

2023-12-04 10:02:23 +00:00
---
obj: application
aliases: ["7zip", "7z"]
---
2024-03-19 08:25:42 +00:00
2023-12-04 10:02:23 +00:00
# 7Zip
2024-02-12 14:32:44 +00:00
7-Zip is a file archiver with the highest compression ratio. The program supports 7z (that implements LZMA compression algorithm), [ZIP](../../../files/ZIP.md), CAB, ARJ, GZIP, BZIP2, [TAR](tar.md), CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in [ZIP](../../../files/ZIP.md) format.
2023-12-04 10:02:23 +00:00
## Usage
Add file/directory to the archive (or create a new one):
```shell
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:
```shell
7z u archive_name file_name
```
List the content of an archive:
```shell
7z l archive_name
```
Extract files:
```shell
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:
```shell
7z t archive_name
```