Packaging Compression
One, compress+[option]+ file name (default delete original file)
-D decompression
- C just preview the generated content, do not delete the original file, need to cooperate > use to generate the compressed file
Compress-c File > file. Z
Note: Only input compress-c file name, will display garbled, input reset return to normal
- v Show details such as compression ratio
uncompress decompression, equivalent to compress-d
zcat Preview uncompressed content, equivalent to compress-d-C, also need to cooperate with > to generate the original file
Small tip: The source files (including the original and compressed files) are not deleted when mated > used
use > to generate a new file, so the new file will be affected by Umask
Second, gzip+[ option]+ file name (default delete original file)
- D Unzip
- C Just preview the generated content, do not delete the original file, need to cooperate > use to generate the compressed file
- N(1-9) specifies the compression ratio, the larger the value, the greater the compression ratio, the default is 6
Gunzip Decompression, equivalent to gzip-d
Third, bzip2+[option]+ file name (default delete original file)
- D Unzip
- k Keep the source file, and the resulting file permissions do not change
- N(1-9) specifies the compression ratio, the larger the value, the greater the compression ratio, the default is 9
bunzip2 Decompression, equivalent to bzip2-d
Bzcat Preview the content after decompression
Iv.. xz+[option]+ file name
- D decompression
- k preserves the source file, and the resulting file permissions do not change
- n(1-9) specifies the compression ratio, the larger the value, the greater the compression ratio, the default is 6
unxz decompression, equivalent to xz-d
xzcat preview content after decompression
Five, packaging compression
zip-r + compressed files (. zip) + source files (can be multiple)
unzip + compressed files (. zip)
Six, packaging
TAR-CVF + packaged files (. Tar) + Multiple files package multiple files into one file (do not delete source files), show details (v)
tar-xvf + package file unpacking
tar-xf + packaged files (. Tar) extracted to the current directory
tar-xf + package files (. tar.xz) + files extract a file from a compressed package to the current directory
TAR-JCVF + packaged files (. TAR.XZ) + Multiple files pack and compress multiple files
TAR-JXVF + package file unpacking and unpacking
TAR-ZCVF + packaged files (. tar.gz) + Multiple files
TAR-ZXVF + package file (. tar.gz)-C + directory to save unpacked files to the specified directory
TAR-JCVF + packaged files (. tar.bz2) + Multiple files
TAR-TF Preview content after unpacking or unpacking
TAR-RF + package file (. tar) + file path add files to the specified package file
Linux Learning-Packaging compression