ArchWiki / 7-Zip
ArchWiki / 7-Zip
es:7-Zip hu:7-Zip ja:p7zip ru:7-Zip zh-hans:7-Zip
7-Zip is a file archiver with a high compression ratio. It was previously provided by the p7zip package.
Installation
The command to run the program is the following:
$ 7zAlternatively, bsdtar(1) provides 7z archive support and is included within the libarchive package.
Examples
Do not use 7z format for backup purposes, because it does not save owner/group of files.
Add file/directory to the archive (or create a new one):
$ 7z a archive_name file_nameAlso it is possible to set password with flag -p and hide structure of the archive with flag -mhe=on:
Using the -p flag will ask you to enter a password on the command line. As of version 24.09, what you provide at the Enter password: prompt is no longer hidden; what you type is visible, and no password confirmation is requested.
$ 7z a archive_name file_name -p -mhe=onUpdate existing files in the archive or add new ones:
$ 7z u archive_name file_nameList the content of an archive:
$ 7z l archive_nameExtract all files from an archive to the current directory:
$ 7z x archive_nameExtract into a new directory:
$ 7z x -odirectory_name archive_nameCheck integrity of the archive:
$ 7z t archive_nameDifferences between 7z, 7za and 7zr binaries
The package includes three binaries:
7zuses plugins to handle archives.7zais a stand-alone executable that handles fewer archive formats than 7z.7zris 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.