Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to extract the command of zip by linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to extract zip commands in linux. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

Linux is a free-to-use and freely distributed UNIX-like operating system, is a POSIX-based multi-user, multitasking, multi-threaded and multi-CPU operating system, using Linux to run major Unix tools, applications and network protocols.

The command to unzip linux zip is unzip. The specific way to use this command is: first install unzip through "sudo apt install unzip"; then unzip zipped_file.zip"command.

How to extract zip file under Linux system

Zip in Linux is a common way to create compressed archive files and is also a traditional file archive file format, created in 1989, and due to its widespread use, users often encounter zip files. This article will bring a small series of Linux system decompression zip file operation method.

In order to extract the zip archive, you must first install the unzip package on your Linux system. Most Linux distributions provide support for uncompressing zip files, but it never hurts to check these zip files to avoid future corruption.

On Unbutu and Debian-based distributions, unzip can be installed using the following command:

sudo apt install unzip

If the Linux system is installed, it will be notified that it is installed. Once unzip is installed on a confirmed system, you can unzip the zip archive. You can also use command-line or graphical tools to achieve your goals. Here's how to do it.

1. Use the command line to extract files

Using the unzip command on Linux is very simple, directly in the directory where the zip file is placed, with the following command:

unzip zipped_file.zip

Instead of extracting the zip file to its current location, you can provide the path to extract it. You will see the extracted file in the terminal output:

1)unzip metallic-container.zip -d my_zip2)Archive: metallic-container.zip3)inflating: my_zip/625993-PNZP34-678.jpg4)inflating: my_zip/License free.txt5)inflating: my_zip/License premium.txt

There's one small problem with the above command. It extracts everything from the zip file into the current folder and then leaves a bunch of unorganized files under the current folder, which is not ideal.

2. Extract to folder

On the Linux command line, it is a good idea to extract files into a folder, because in this way all extracted files will be stored in the specified folder, or created if the folder does not exist.

For example: unzip zipped_file.zip -d unzipped_directory, so now everything in zipped_file.zip will be extracted into unzipped_directory.

And we want to pursue convenience, so there is a caveat here, that we can view the contents of compressed files without actually decompressing them.

3. View the contents of the compressed file without decompressing the compressed file

Command: unzip -l zipped_file.zip

4. Use the graphical interface to extract files

If the user is using the desktop version of Linux system, it can not always use the terminal, in the graphical interface, you can use another mode of operation.

Open File Manager and jump to the folder where the zip file is located. Click the right mouse button on the file, and you will see the option [Extract here] in the pop-up window. Click Select.

Unlike the unzip command, this extract option creates a folder with the same name as the compressed file, and stores all the contents of the compressed file into the created folder. Compared to the default behavior of the unzip command, which extracts the compressed file into the current file, the graphical interface operation is very simple.

Note that there is also an option [Extract to...] to select a specific folder to store the extracted files.

Thank you for reading! About "linux how to extract zip command" this article is shared here, I hope the above content can have some help for everyone, so that we can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report