Home >Operation and Maintenance >Linux Operation and Maintenance >What is the command to decompress gz files in Linux?

What is the command to decompress gz files in Linux?

青灯夜游
青灯夜游Original
2019-02-28 16:12:02204091browse

Linux commands to decompress gz files include: gunzip command, gzip command, and tar command. The following article will take you through it, I hope it will be helpful to you. [Video tutorial recommendation: Linux tutorial]

What is the command to decompress gz files in Linux?

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

.gz file decompression

If it is a gz file ending with the .gz extension, you can use the gunzip command and the gzip command to decompress it.

gunzip command

is used to decompress files, and the usage permissions are for all users. Example:

gunzip FileName.gz

gzip command

The gzip command is a command commonly used in Linux systems to compress and decompress files. It is both convenient and easy to use. Gzip can not only be used to compress large, rarely used files to save disk space, but can also be used together with the tar command to form a popular compressed file format in the Linux operating system.

Basic sentence pattern for decompression:

gzip -d FileName.gz

Supplement: You can use the gzip command to create a .gz file, basic sentence pattern:

gzip FileName

.tar .gz (.tgz) file decompression

If it is a gz file ending with the .tar.gz (.tgz) extension, you can use the tar command to decompress it and execute the following Command:

tar zxvf FileName.tar.gz

to decompress the .tar.gz file

The above is the entire content of this article, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !

The above is the detailed content of What is the command to decompress gz files in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more