7-Zip

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.
Not to be confused with p7zip.


Resources

7-Zip is a file archiver.

Installation

USE flags

USE flags for app-arch/7zip Free file archiver for extremely high compression

jwasm Use dev-lang/jwasm to include optimized code (doesn't support AES)
rar Enable support for non-free rar decoder
uasm Use dev-lang/uasm to include optimized code

Emerge

7-Zip can be installed by running:

root #emerge --ask app-arch/7zip

Usage

Extraction

To extract all files from an archive, use either e or x in the following command:

user $7zz <e/x> <archive name>

In the above command, e will simply just extract the archive, while x will extract the archive, but with full paths.

Archiving

To add files and/or folders to an archive, use the following command:

user $7zz a <folder/file(s) name(s)>

Making a password-protected archive

Warning
The 7zip man-page STRONGLY advises against using 7-zip for back-up purposes due to the fact that owner/group permissions are NOT stored.

A password-protected archive can be created using the following flags:

  • -p : Prompt's the user for a password


Optionally, archive header encryption can also be enabled using -mhe=on, which forces the 7z format to be used.

External resources

https://linux.die.net/man/1/7z - 7-zip Linux man-page