This evening I need to extract a file with .7z extension. Guess what? I don’t know how to do that. I probably don’t even have 7zip program installed on my Fedora machine.
Here’s something to remind myself how to get it working.
First let’s find out what package we need to install:
[root@watamem ~]# dnf search 7zip Last metadata expiration check: 3:14:50 ago on Thu Oct 20 20:39:30 2016. ================ N/S Matched: 7zip ================== p7zip-plugins.x86_64 : Additional plugins for p7zip p7zip.x86_64 : Very high compression ratio file archiver p7zip-gui.x86_64 : 7zG - 7-Zip GUI version
So, it seems we need to install
# dnf install p7zip ... Installed: p7zip.x86_64 16.02-1.fc24
Okay. What is the command to run? My guess is that there should be one or two file in
# rpm -ql p7zip | grep bin /usr/bin/7za
Ah ha, it’s 7za. Now we can check its man page on how to extract file. I don’t have to remind me to type
man 7za, do I?
To extract a .7z file with full path use the
x function letter. For example:
$ 7za x a_crompressed_file.7za
If you use Debian based system, you probably need to install the same package name (p7zip) using apt or aptitude command instead. The command to extract file should be just the same.