Linux File Archive compression and linux File Archive
File Archive compression:
Compression and decompression command compression formats: gz, bz2, xz, zip, z
Compression Algorithm: different algorithms and different compression ratios
Compress: FILENAME. Z
Uncompress
Gz: gzip. gz gzip/PATH/TO/SOMEFILE: the original file is deleted after compression.
-D/PATH/TO/SOME_COMPRESSFILE.gz: equivalent TO gunzip
-#: 1-9. Specify the compression ratio. The default value is 6.
Gunzip/PATH/TO/SOME_COMPRESSFILE.gz: After decompression, the original compressed file will be deleted.
Zcat/PATH/TO/SOME_COMPRESSFILE.gz: view the content of a text file without any pressure
Bz2: bzip2. bz2 has a larger compression ratio than gzip, but small files are not dominant, and the format is similar.
Bzip2/PATH/TO/SOMEFILE: compression will delete the original file
-D:
-#: 1-9,
-K: the original file is retained during compression.
Bunzip2/PATH/TO/SOMEFILE: Decompress the file and delete the original file.
Bzcat: You can directly view the file content without any pressure.
Xz:. xz/PATH/TO/SOMEFILE
-D
-#: 1-9
-K: the original file is retained during compression.
Unxz/PATH/TO/SOMEFILE
Xzdec: Another decompression method, which is output to the screen by default
Xzcat:
The preceding three commands only compress files and cannot compress directories.
Zip: Archive and compress. Do not delete the original file zip FILENAME.zip file1 file2 after compression...
Unzip FILENAME.zip
Archive: archive. archive does not mean compression.
Tar: archive tool. Only archive, no compression, no deletion of the original file-c: Create an archive file
-F FILE.tar: the archived file for the operation.
-X: Expand the archive
-- Xattrs: The file is archived at the same time. Preserve the extended attributes of a file
-T: do not expand the archive. Check which files are archived.
-Zcf: Archive and compress it into gzip format
-Zxf: Decompress an archive compressed file in gzip format
-Jcf: bzip2 format
-Jxf:
-Jcf: xz format
-Jxf:
Cpio: archiving Tool
Read:
-P "prompt": Output prompt information