The following describes the syntax of common gzip options and the meaning of Chinese characters to help you understand your memory. Don't let the little dummies put so many things that you don't understand.
This evening, I watched laruence's private food and took notes while learning.
In linux, the compression types are .tar, .tar.gz,. tgz,/gz, and. bz2.
. Gz is a file compressed by gzip.
. Bz2 is a file compressed by bzip2
The software packaged by the. tar program has not been compressed.
The .tar.gz tar program compresses the file by using gzip.
Files compressed by the .tar.bz2 tar program are compressed by bzip.
Gzip is a compression tool.
The following describes the syntax of common gzip options and the meaning of Chinese characters to help you understand your memory. Don't let the little dummies put so many things that you don't understand.
Gzip-[cdtv #]
-C, -- stdout write on standard output, keep original files unchanged, here c you can use the customer (customer, client) aspect Lenovo memory. Enter it to the client.
-D, -- decompress indicates decompression.
-V, -- verbose mode is to see how much is compressed. The proportion to which a lengthy file is compressed.
After gzip compression, overwrite the original file. Directly generate a compressed file. The suffix of the compressed file is .gz.
The file suffix behind bzip2 is .bz2.
Bzip2 is designed to replace gzip and provide better compression quality. Because it is an upgraded version of gzip, the usage is the same. -V is compressed. -D: decompress the package.
Although gzip and bzip2 are both useful. However, gzip compresses a single file. In practical applications, I use to compress folders. At this time, the packaging command is very important.
Command for packaging and unpacking
Only list the commands that are most commonly used and easier to remember. If you are interested in research, you can use tar -- help to view the information.
The name of the source file to be compressed by the compressed command tar-cj-f is as follows:
The following commands are explained in detail:-j is compressed using bzip2. The reason for such a name is as follows. I don't know. remember.
-C indicates create. Create an archive document. Create a folder to package the files to be compressed.
-F indicates file. Is where the compressed files are stored. The file name used.
Decompress the command: tar-xj-f. name of the file to be decompressed
-X indicates extract, extract, and extract.
The-j parameter in tar above is compressed and decompressed in bzip2 mode. If you try to see the format of the compressed city .gz. It can be represented by-z. The same is true during decompression.
The tar command is really powerful. It is also useful to back up only new files than at some point in time. I will try again later.