We receive a 7z file and we want to extract it on the command line. We search on Google and we are confused because some examples use 7z and some others use 7za.
We can use both 7z or 7za or even 7zr as long as the format for the archive is 7z.
From Arch Linux Wiki:
7z uses plugins to handle archives.
7za is a stand-alone executable. 7za handles fewer archive formats than 7z, but does not need any others.
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.
Depending on our OS or Linux distro, the binaries may be packed in a single package or you may have to install different package.
Arch Linux packs them in a single package but it is not in CentOS.In CentOS 7, 7z binary is available only after installing p7zip-plugins.
rpm -qf `which 7za` p7zip-16.02-2.el7.x86_64 rpm -qf `which 7z` p7zip-plugins-16.02-2.el7.x86_64
7za comes from p7zip and 7z comes from p7zip-plugins.
In Mac, brew install p7zip installs 7z, 7za and 7zr.
brew list p7zip | grep bin /usr/local/Cellar/p7zip/16.02/bin/7z /usr/local/Cellar/p7zip/16.02/bin/7za /usr/local/Cellar/p7zip/16.02/bin/7zr