How to unpack zip in linux

Anonim

How to unpack zip in linux

Store programs, directory and files are sometimes easier as an archive, because they take less space on the computer, and can also move freely through removable media to different computers. A ZIP is considered one of the most popular formats of archives. Today we would like to tell about how to work with this type of data in operating systems based on the Linux kernel, since additional utilities will have to use for the same unpacking or viewing content.

Unpack the ZIP format archives in Linux

Next, we will touch on two free popular utilities that are managed through the console, that is, the user will have to enter embedded and additional commands to manage all files and tools. An example will be the Ubuntu distribution, and for owners of other assemblies we will make accents on any incisions.

Separately, I would like to note if you are interested in the further installation of the program from the archive, first check if it is in official repositories or individual packages for your distribution, because it is much easier to implement such installation.

With regard to additional arguments used in Unzip utility, it should be noted here several of the most important:

  • -u - update existing files in the directory;
  • -V - Displays all available information about the object;
  • -P - setting the password to obtain permission to unpack the archive (in case of encryption);
  • -n - not overwrite already existing files in the place of unpacking;
  • -J - ignoring the archive structure.

As you can see, nothing complicated in the management of the Utility called Unzip is not, but it is not suitable for all users, so we advise you to get acquainted with the second method where a more common solution will be applied.

Method 2: 7z

The multifunctional 7Z utility for working with archives is designed not only to interact with the file type of the same name, but also supports other popular formats, including ZIP. For operating systems on Linux, there is also a version of this tool, so we offer to get acquainted with it.

  1. Open the console and download the latest version of 7z from the official repository by entering the Sudo Apt Install P7zip-Full command, and the winners of Red Hat and CentOS will need to specify Sudo Yum Install P7zip.
  2. Team to install 7z in Linux

  3. Confirm Adding new files into the system by selecting an affirmative option.
  4. Confirm Adding Files for 7Z in Linux

  5. Move to the folder where the archive is stored, as shown in the previous method using the CD command. Here, review the contents of the object before unpacking by writing in the 7Z L folder.zip console, where the folder.zip is the name of the desired archive.
  6. View archive files through the 7Z utility in Linux

  7. The unpacking process in the current folder is carried out through 7z x folder.zip.
  8. Unpack the contents of the archive through 7z in Linux

  9. If some files with the same name are already present there, they will be offered to replace or skip. Choose an option based on your own preferences.
  10. Confirm file replacement for 7Z in Linux

As in the case of Unzip, in 7z there are a number of their additional arguments, we also recommend getting acquainted with the main ones:

  • e - extracting files indicating the path (when used x path is preserved for the same);
  • t - checking the archive for integrity;
  • -p - specifying the password from the archive;
  • -x + list of files - do not unpack the specified objects;
  • -y - positive answers to all the questions set during unpacking.

You received instructions on the use of two popular utilities for unpacking ZIP in Linux. Pay special attention to additional arguments and do not forget to apply them in case of need.

Read more