The compression format in Linux is mainly composed of GZ, bz2, XZ, compress, zip
One, gzip: after compression format is. GZ (after compression and decompression, the original file is deleted)
Usage: gzip [optinons] FILENAME ...
-D: Decompression, equivalent to using Gunzip
-F: Forced decompression
-Q: Do not display warning messages
-#:[0-9] Specify compression ratio
Compression level, 0-2 for fast compression, 3-5 for medium compression, 6-9 for excellent compression, 6 for default
-L: Lists information about compressed files
-R: Recursively handles all files under the specified directory
-T: Test for compressed files with errors
Zcat: In the case of uncompressed, view the contents of the compressed file
Second, bzip2: Compressed after the format of. BZ2, greater compression than gzip, usage and gzip the same
-K: Preserve source files when compressing or decompressing
-D: Decompression, equivalent to using BUNZIP2
-#: Specify compression ratio
Bzcat: In the case of uncompressed, view the contents of the compressed file
Third, XZ: The format is XZ after compression, the new compression tool has a higher compression ratio
-Z: Forced compression
-D: Forced decompression, equivalent to UNXZ
-T: Testing the integrity of compressed files
-L: View more information
-K: Compress or decompress reserved source files
-F: Extract mandatory overwrite file
Xzcat | Xzdec: In the case of uncompressed, view the contents of the file
Four, conpress: After the format is compressed. Z, which is rarely used, is not supported in some Linux distributions
Zip: Zip compression and archive after compression, do not delete source files after compression
Usage: Zip [Optinos] filename.zip FILE1, FILE2 ...
Compression requires a compressed file name Filename.zip
-C: Add comments to a compressed file
-M: Delete source files after compression
-K: DOS compatible
-b<path>: Making compression to the directory
-R: Recursive processing
Zipinfo: View details of files in compressed files
unzip unzip. zip
-O: Do not ask the user, overwrite the source file directly when extracting
-L: Display information for compressed files
-L: Change file name of compressed file to lowercase
-V: The execution is to display more information
-N: Source file not overwritten when uncompressed
. zip file: Specify the files to process
-X File: Specifies a file that is not processed
-Z: equivalent to using Zipinfo to view the details of files within a compressed file
Archive (archive):
Tar: Archive tool, archive does not mean compression, can call compression function implementation
-C: Create an archive file
-F: Archived files for operations
-X: Unzip the archive
--xattrs: Preserves the file's attribute information when archiving
-T: Do not expand the archive to see directly what files are in the archive
-Z: Call the gzip compression command
-J: Call bzip2 compression command
-j: Calling the XZ command
-K: Do not replace existing files when extracting
-V: Show detailed steps
-C: Specify the directory to unzip
-u: Append newer files than archived copies
-U: Delete the file you want to overwrite before extracting it
cpio: archive command used earlier
This article is from the "Pole Men" blog, please be sure to keep this source http://wtime.blog.51cto.com/8829658/1538555