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 write the command for Linux to extract the gz file

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how to write the command for Linux to extract gz files, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

Gz files are compressed files with a .gz or .tar.gz (.tgz) extension, which are common under Linux, UNIX, and OSX. Both Linux and OSX can extract and use this compressed file directly. Under Windows, the compression software WinRAR is commonly used to open gz files, which is equivalent to the common RAR and ZIP formats.

Decompress .gz file

If it is a gz file that ends with a .gz extension, you can use the gunzip command and the gzip command to extract it.

Gunzip command

The function is to extract the file, and the permission is for all users. Example:

Gunzip FileName.gz

Gzip command

Gzip command is a command that is often used in Linux system to compress and decompress files, which is convenient and easy to use. Gzip can not only be used to compress large, less used files to save disk space, but also can be used with tar commands to form a more popular compressed file format in Linux operating systems.

The basic sentence pattern of decompression:

Gzip-d FileName.gz

Supplement: you can use the gzip command to create .gz files, basic sentence patterns:

Gzip FileName

.tar.gz (.tgz) file decompression

If it is a gz file that ends with a .tar.gz (.tgz) extension, you can use the tar command to extract it by executing the following command:

Tar zxvf FileName.tar.gz

You can extract the .tar.gz file.

The above is all the contents of the command for Linux to extract the gz file. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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