Difference between revisions of "P7zip"

From ArchWiki
Jump to: navigation, search
(Differences between 7z, 7za and 7zr binaries: link man pages)
m (Mentions 7z l too; rephrase a bit; 7zr can not handle emcrypted archives.)
Line 18: Line 18:
  
 
== Examples ==
 
== Examples ==
 +
* List the content of an archive:
  
To extract all files from an archive to the current directory without using directory names, run:
+
$ 7z l <archive name>
 +
 
 +
* Extract all files from an archive to the current directory without using directory names:
  
 
  $ 7z e <archive name>
 
  $ 7z e <archive name>
  
To extract with full paths, run:
+
* Extract with full paths:
  
 
  $ 7z x <archive name>
 
  $ 7z x <archive name>
  
To extract into a new directory, run:
+
* Extract into a new directory:
  
 
  $ 7z x -o<folder name> <archive name>
 
  $ 7z x -o<folder name> <archive name>
Line 36: Line 39:
  
 
* {{man|1|7z}} uses plugins to handle archives.
 
* {{man|1|7z}} uses plugins to handle archives.
* {{man|1|7za}} is a stand-alone executable. 7za handles fewer archive formats than 7z, but does not need any others.
+
* {{man|1|7za}} is a stand-alone executable that handles fewer archive formats than 7z.
* {{man|1|7zr}} is a stand-alone executable. 7zr handles fewer archive formats than 7z, but does not need any others. 7zr is a "light-version" of 7za that only handles 7z archives.
+
* {{man|1|7zr}} is a stand-alone executable. It is a "light-version" of 7za that only handles 7z archives. In addition, contrary to 7za, it can not handle encrypted archives.
  
 
== See also ==
 
== See also ==

Revision as of 08:59, 9 July 2018

p7zip is command line port of 7-Zip for POSIX systems, including Linux.

Installation

Install the p7zip package.

The command to run the program is the following:

$ 7z

Examples

  • 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>

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:

  • 7z(1) uses plugins to handle archives.
  • 7za(1) is a stand-alone executable that handles fewer archive formats than 7z.
  • 7zr(1) is a stand-alone executable. It is a "light-version" of 7za that only handles 7z archives. In addition, contrary to 7za, it can not handle encrypted archives.

See also