Compression and decompression tools commonly used in Linux systems
Compression: An operation that takes time to change space;
Principles of compression: marking and substitution;
Compression ratio: The ratio of the size of the compressed file before compression, where: the compression of plain text files is relatively large, video, image and other file compression ratio is small
A tool that can implement compression capabilities:
Compress/uncompress:. Z Extension
gzip/gunzip:.gz extension
BZIP2/BUNZIP2:.BZ2 extension
XZ/UNXZ:.XZ extension, currently the highest compression tool
Zip/unzip:.zip extension
Gzip:
gzip, Gunzip, zcat-compress or expand files
Common options:
-D: Unzip
-#: Compression with the specified compression ratio, 1-9 is the highest; default 6
-C: Output compression results to standard output without compressing the original text
BZIP2:
bzip2, bunzip2-a block-sorting file compressor, v1.0.4
bzcat-decompresses files to stdout
-D: Unzip
-#: Specify compression ratio for compression, 1-9, default is 6
-K: Keep the original file not deleted, create a new compressed file;
Xz
XZ, UNXZ, xzcat-compress or decompress. xz files
-D: Unzip
-#: Specify compression ratio for compression, 1-9, default is 6
-K: Keep the original file not deleted, create a new compressed file;
Tar: Archive Program
Tar----Tape Archive: Tape Archive
Tar [OPTION ...] [FILE] ...
Main options:
-C: Create an archive file
-x: Release the contents of the archive file
-T: View files included in the profile
-u/-r: Add a new file to the archive file
Accessibility Options:
-F: Path to the file that specifies the archive
-C: Specifies the path to release when releasing the contents of the archive file;
-Z: Call gzip to compress when creating an archive file
-j: Call bzip2 to compress when creating an archive file
-j: When creating the profile, call XZ for compression (may not be supported)
--exclude: Exclude a file when releasing the archive file;
Compression and decompression tools commonly used in Linux systems