Linux commands-Compression commands gzip bzip2

Source: Internet
Author: User

Compression in. gz format

Gzip Source files

#压缩为. GZ-formatted compressed file, the source file disappears

Gzip-c original files > Compressed files (not recommended)

#压缩为. gz format for compressed files, source files reserved

Example: Gzip-c Cangls > Cangls.zip

Gzip-r directory (not recommended)

#压缩目录下的所有子文件, but cannot compress the directory

Windows systems can decompress compressed files in the. gz format.

. GZ Decompression Commands

gzip-d Compressed Files

Or

Gunzip Compressed Files

Gunzip-r Directory

#可以解压缩目录里面的所有. GZ Compressed Files

. bz2 format Compression

bzip2 source File

#压缩为. bz2 format, do not retain source files

Bzip2-k source File

#压缩为. bz2 format, preserving source files

Note: The BZIP2 command cannot compress the directory

bzip2-d Compressed Files

#解压缩,-K Reserved Compressed files

BUNZIP2 Compressed Files

#解压缩,-K Reserved Compressed files

Linux commands-Compression commands gzip bzip2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.