p7zip
p7zip is command line port of 7-Zip for POSIX systems, including Linux.
The original author has not made an update since 2016, but the version packaged in Arch Linux is from an active fork, and the upstream 7-zipAUR (or 7-zip-fullAUR) now has a Linux version. None of these provide a GUI, see List of applications/Utilities#Archive managers for a list of front-ends that can use this compression method among others.
Examples
Add file/directory to the archive (or create a new one):
$ 7z a archive_name file_name
Also it is possible to set password with flag -p
and hide structure of the archive with flag -mhe=on
:
$ 7z a archive_name file_name -p -mhe=on
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 all files from an archive to the current directory without using directory names:
$ 7z e archive_name
Extract with full paths:
$ 7z x archive_name
Extract into a new directory:
$ 7z x -o folder_name archive_name
Check integrity of the archive:
$ 7z t archive_name
Differences between 7z, 7za and 7zr binaries
The package includes three binaries, /usr/bin/7z
, /usr/bin/7za
, and /usr/bin/7zr
. Their manual pages explain the differences:
- uses plugins to handle archives.
- is a stand-alone executable that handles fewer archive formats than 7z.
- is a stand-alone executable. It is a "light-version" of 7za that only handles 7z archives. In contrast to 7za, it cannot handle encrypted archives.