Yesterday, Lao Zuo shared zip/unzip Compression and decompression methods. In fact, there are many compression and decompression commands available in Linux VPS, such as tar. gz, tar. bz, rar, gzip, and so on. We do websites or play VPS. Personally, as long as we can use one or two of them, it is not scientific research. It is unnecessary to master all of them. Of course, if you want to master it, you can.
Yesterday's zip/unzip is preferred by Laozuo, but sometimes we install llsmp without ZIP command execution by default, so we need to install the execution component( Recommended reading: Solve the unzip file of Linux VPS installation )For example, the llsmp we installed has the tar.gz command available by default, so I think it is necessary to learn this command. Most webmasters use this, and ZIP is not very useful. Now let's learn how to use it.
1. Compression command:
Format: tar - zcvf compressed name. tar.gz compressed file
example: tar -zcvf laozuo.org.tar.gz html
2. Decompress command:
Format: tar - zxvf decompress filename. tar.gz
example: tar -zxvflaozuo.org.tar.gz
Explanation: Although there are other parameters, in order not to mislead you, I will directly use an example to tell you that compression and decompression should be used this way.