1. Compression formats: gz, bz2, xz, zip, and Z
Ii. compression algorithms: different algorithms and different compression ratios
Iii. commands:
1. gzip: generate a. gz compressed file. Only files can be compressed. After compression or decompression is completed, the original file will be deleted.
Format: gzip/PATH/TO/SOMEFILE:
-D: Extract
-#: 1-9. Specify the compression ratio. The default value is 6;
Decompress gunzip/PATH/TO/SOMEFILE.gz
Zcat/PATH/TO/SOMEFILE.gz: Check the content of the text file.
2.bzip2: Generate. bz2 compressed file. Only files can be compressed. After compression or decompression is completed, the original file will be deleted. A compression tool with a greater compression ratio than gzip uses an approximate format.
Format: bzip2/PATH/TO/SOMEFILE
-D: Extract
-#: 1-9; default value: 6
-K: the original file is retained during compression.
Bunzip2/PATH/TO/SOMEFILE.bz2 unzip
Bzcat: Check the content of a text file without any pressure
3. xz: generate a. xz compressed file. Only files can be compressed. After compression or decompression is completed, the original file will be deleted.
Format: xz/PATH/TO/SOMEFILE
-D: Extract
-#: 1-9; default value: 6
-K: the original file is retained during compression.
Unxz: Extract
Xzdec: view the content of a text file without any pressure
Xzcat: view the content of a text file without any pressure
2. archive does not mean compression.
1. tar: archive tool that generates. tar archive files
-F FILE.tar: the archived file for the operation.
-Cf: Create an archive file
-Xf: Expand the archive
-- Xattrs: retains the extended attributes of an object during archiving.
-T: You can directly view the archived files without expanding the archive.
-Zcf: Archive and call gzip Compression
-Zxf: Call gzip to decompress and archive. The-z option can be omitted.
-Jcf: bzip2
-Jxf:
-Jcf: xz
-Jxf:
2. cpio: archiving Tool
3. zip: an archive and compressed Tool
Format: zip FILENAME.zip FILE1 FILE2... Do not delete the original file after compression
Decompress: unzip FILENAME.zip.
Linux archive compression and software management