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 use the command line to view compressed documents in Linux

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

Share

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

This article is about how to use the command line to view compressed documents in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Use local materials and use your own command line directly.

The command line is the main operation carrier of Linux. For compressed files in common formats, we can view the compressed package directly using the command line that comes with the system. For example, many documents under linux are compressed using .tar format, if you want to view this kind of package, first start the MATE terminal, and then enter the command "tar-tf / home/yumufa/ download / qq.tar" under the terminal, so you can see the files in the package (figure 1).

Figure 1 tar view the contents of the package

If it is a zip file, enter "zip-sf / home/yumufa/ download / qq.zip" directly at the terminal to view it. Similar built-in commands include zcat, gzip, less commands, etc., the use of these commands are more or less the same, as long as the terminal enter the corresponding command + parameters to complete the view of the compressed package, such as entering "less / home/yumufa/ download / qq.tar", you can view the contents of the tar package (figure 2).

Figure 2 use the less command to view the compressed package

Out of the box, using a third-party command line

Some compressed package formats involve copyright and other reasons, although there is no built-in command line in Linux, for this type of compression that cannot be viewed by the built-in command of the system, it can be installed immediately in Linux.

For example, in the .rar file, just type "sudo apt install rar" in the terminal and press the prompt to enter the administrator account password, so that you can complete the download and installation of the rar command (figure 3). Of course, if the installation cannot be completed on the command line, many Linux systems now have software installation center components that we can search and install on our own.

Figure 3 install the rar command

After completing the installation of the command, continue to type "rar / home/yumufa/ download / qq.rar" in the terminal so that you can view the contents of the rar package (figure 4).

Thank you for reading! On "how to use the command line in Linux to view compressed documents" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to 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