Gzip adopts the file extension gz compressed by gzip. Its syntax is as follows: gzip [-cdtv] filename-c: Compress-d: decompress-t: check file consistency-v: display compression ratio and other messages-: compression level, value range: 1 ~ 9, 9 of which has the highest compression rate. the default value is 6. the extension name of the file using g gzipw.gzipcompressed is .gz. Its syntax is as follows:
Gzip [-cdtv #] filename-c: Compression-d: extract-t: check file consistency-v: Display compression ratio and other messages-#: compression level, value range: 1 ~ 9, 9 of which has the highest compression ratio. the default value is 6.
Note when using gzip: by default, the original file will no longer exist, so be careful. to retain the original file, perform the following operations:
Gzip-c man. config> man.config.gz
Another point: the default compression ratio of 6 is good enough, and it is not recommended to modify it. The usage is almost the same as that of gzip. The compression command mentioned earlier in tar can only compress a single file and cannot compress this directory. the tar command can package and compress the entire directory, and its syntax is very complex, however, the most common commands are as follows:
Compression: files or directories to be compressed by tar-zcvf filename.tar.gz-files or directories to be compressed by gzip-files or directories to be compressed by jcvf filename.tar.gz 2-compressed by bzip2 query: tar-ztvf filename.tar.gz tar-jtvf filename.tar.gz 2 decompress: tar-zxvf filename.tar.gz directory tar-jxvf filename.tar.gz 2 to be decompressed