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]
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!