Compress and decompress, archive
Compress command
Compress compression (early compression command)
Uncomprss Decompression
Compression ratio: (compressed file size before-compressed file size): File size before compression
gzip [option] fileName (. gz)
-D Decompression
-# (1-9) specifies the compression ratio, which defaults to 6.
Gunzip filename.gz
Zcat filename.gz to view the contents of a file without decompressing
bzip2 [option] fileName (. bz2)
-D Unzip the file
-# (1-9) specifies the compression ratio, which defaults to 6.
-K to retain the original file after compression
BUNZIP2 filename.bz2 Extract Files
Bzcat viewing the source document without decompressing
XZ [option] fileName (. gz)
-D Unzip the file
-# (1-9) specifies the compression ratio, which defaults to 6.
-K to retain the original file after compression
UNZX Decompression
Zxcat viewing the source document without decompressing
1, compression algorithm is different, compression ratio of the same
2. bZIP gzip can only compress files, cannot archive files
3. The three commands will delete the original file after the compression is complete, and the decompression is also
4, the so-called uncompressed view file is actually looking for a temporary directory decompression
Archive Command (archive does not mean compression)
Zip: Can be archived and can be compressed
Zip filename.zip file file1 file2 .... (The original file will not be deleted after compression)
Unzip decompression
Tar Archive tool
-C Create an archive file
-F Filename.tar Operation Archive (must follow the file name after-f)
-X Expand Document
-ZCF archive files and call the GZIP compression tool
-ZXF call gzip Unzip and expand archive | (Z can be omitted, will be identified from the suffix name)
-JCF archive file and call bZIP compression tool
-JXF Call bZIP Extract and expand archive
-JCF archive file and call the XZ compression tool
-JXF Call XZ Extract and expand archive
Cpio: Archive Tool
Review and improvement of small white 7