Possibly many of the computer user know the process of archiving files is and how to reduce the size of a file. Even if the term ‘file archiving’ is not be familiar to some, the file types “TAR”, “ZIP” and “RAR” are definitely known by every computer user. These formats have become the standard of archiving, providing a good level of compression and user-friendly interface. WinRar archiving program works flawlessly, but has one drawback – it is actually paid. Considering the fact that 7-Z archiver works no worse than WinRar, it has now replaced WinRar program. Tape Archive (tar) is one of the oldest and supports POSIX attributes but lacks built-in compression. We have guide on tar for the command line users. 7Z has similarity of features with tar, rather has more features compared to tar. In this article, we will learn how to open 7z file and many things more.
Table of Contents |
What Is a 7Z File?
May be many computer users thought for a while what is a 7Z File but never got the time to read a brief about it, some command line users are not aware. 7-Zip archives with a .7z file extension
. 7-Zip is a free and open-source file archiver with own 7z archive format with it’s source code under the GNU LGPL license. These files are created using a compression method called LZMA, which is an algorithm for lossless data compression.
---
The main advantage of 7-Z archiver is associated with its convenience: a group of files can be packed into one package, especially when needed to forward a group of files by e-mail. Also, thanks to the applied technology, the archiving process allows to reduce the number of files packed in a single package for transferring them to media with less memory being occupied. Also, we can set a password for the archive. Thus, no one else can access the files, except for you. However, we must be very careful and not to forget the password, since hacking 7Z is very difficult and almost impossible.
Specs of 7Z File
The 7z file format specification is distributed with 7-Zip’s source code in plain text format.
First of all, 7Z file extension provides a choice of compression algorithm depending on the file type. As a result of this adjustment, the compression ratio can be significantly higher than that of universal algorithms. Also, with the open architecture, it is possible to use any other algorithm that was not originally included in 7Z.
High-strength encryption using the AES-256 algorithm uses the key generated by the SHA-256 function (just for quick recall, we used SHA-256 for SSL/TLSS certificate tutorial), which is generated based on the password entered by the user. This provides a double protection, which is almost impossible to crack. In addition, the 7-ZIP encrypted password undergoes many different mathematical transformations, which makes its archives even more secure than with the simple use of AES-256.
7-ZIP program can be used from a command line interface with the command p7zip or through a graphical user interface with shell integration. Big part of the 7-Zip source code is under the GNU LGPL license. But the unRAR code is under the GNU LGPL with unRAR restriction which does not permit the developers to use the code to reverse-engineer the RAR compression algorithm. We can list down the offered features of 7Z in brief :
- High compression ratios
- AES-256 encryption
- Large file support
- Unicode file names
- Support for solid compression
- Compression and encryption of archive headers
- Support for multi-part archives
- Support for custom codec plugin DLLs
How to Convert 7Z File
On GUI, the easiest way to convert a 7z archive is to unpack it using the 7-zip program or open the contents with any other archiver of your choice. WinRAR has a built-in conversion utility that can convert a 7z compressed archive of files (and other compression formats) to RAR archives.
How to Open 7Z File
If you are thinking how to open 7z format, then the best option for you is to use the native 7Zip archiver. It fully supports all functions, including file encryption. This utility is free of charge, open source, and its popularity is indicated by the fact that the interface of this program is translated into 79 world languages. If you are looking for something to view contents of 7z and do not plan to add files to the archive, then such archivers as PowerArchiver, WinRAR, IZArc will help you with the mission. All of them support extraction of packed files from the 7z archives. Other programs that can open 7Z files include IZArc, TUGZip, JustZIPit. They are simple to use and are thoroughly tested.
How to Compress and Open 7Z File on CLI or SSH
As for Ubuntu or such Deb GNU/Linux distribution, the package p7zip / p7zip-full provides a command-line application to zip/unzip 7z files. The command is 7z. As for Windows 10, you can work with Ubuntu Bash in the the same way (we have guide to setup Bash on Windows 10). Open bash or similar and type :
1 2 3 | sudo apt-get install p7zip # install the command line utility sudo apt-get install p7zip-full |
For REHL or CentOS, thing is similar like above, you can check info of p7zip package :
1 | yum info p7zip |
For MacOS X with Homebrew, you can run the below commands to install the formula and make it working :
1 2 3 4 5 6 | brew update brew install p7zip # add all files in the sputnik directory to the compressed file heed.7z 7z a heed.7z sputnik # unzip heed.7z 7z x heed.7z |
You can run 7z
as command or man 7z
to see the usage.
In short, these are commands :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # extract 7z e <file_name>.tar.7z # extract with full paths 7z x <file_name>.tar.7z # specify a path to extract to: 7z x <file_name>.tar.7z -o path # list archive details 7z l <file_name>.7z # test integrity of the archive 7z t <file_name>.7z <file_name> # update an existing archive 7z u <file_name>.7z <file_name> # add password, * is to all files 7z a <file_name>.7z * -p<password-here> # open 7z password protected file 7z x <file_name>.7z |