Common compression instructions in Linux systems—Note 6

Common compression instructions in Linux systems

In the Linux environment, the extensions of compressed files are mostly: ".tar, .tar.gz, .tgz, .gz, .Z, .bz2, *.xz", why is there such an extension? Doesn't it mean that the extension of Linux has no effect? This is because Linux supports a lot of compression instructions, and the compression techniques used by different instructions are not the same, of course, they may not be able to communicate with each other to compress/decompress files. Therefore, when you download a compressed file, you naturally need to know which compression command the file was made from, so that you can use it to compare and decompress it! That is to say, although the attributes of Linux files basically have no absolute relationship with the file name, but in order to help us human beings, an appropriate extension is still necessary!

Below we list several common compressed file extensions:

insert image description here
The common compression commands on Linux are gzip, bzip2 and the latest xz. As for compress, it has been out of fashion. In order to support the common zip of windows, in fact, Linux also has a zip command for a long time! gzip is a compression instruction developed by the GNU project, which has replaced compress. Later, GNU developed bzip2 and xz, which have better compression ratios! However, these commands can usually only compress and decompress one file, so it is annoying to need a lot of files for each compression and decompression? At this time, the so-called "packaging software, tar" is very important!

This tar can "package" many files into one file! Even directories can play like this. However, the pure tar function is only "packaging", that is, to assemble many files into one file. In fact, it does not provide the compression function. Later, in the GNU plan, the entire tar and compression functions are combined in one Together, this provides users with more convenient and powerful compression and packaging functions! Let's talk about these basic compression instructions under Linux!

Guess you like

Origin blog.csdn.net/wokaowokaowokao12345/article/details/127519984