"Linux Learning note six" compression decompression command

Source: Internet
Author: User
Tags bz2

All compressed files must be written in compressed format extension

. zip Format compression

#压缩文件zip compressed file name source file # compressed directory zip-r compressed filename Source Directory # extract Unzip compressed files

  

. gz format Compression

The compressed file source file in the #压缩为. gz format disappears from the gzip source file # Compressed file source files in. gz format keep gzip-c source files > Compressed Files # Compress directories under all sub files but cannot compress directories gzip-r Directory # extract gzip-d compressed Files gunzip Compress files

. bz2 format Compression

#压缩为. bz2 format does not retain source file bzip2 source file # compressed after retaining source file bzip2-k source File # Extract-K Preserve compressed file bzip2-d zip file # unzip-K Preserve compressed file Bunzip2 compressed file (Note: The BZIP2 command cannot compress the directory)

Package Command Tar

TAR-CVF package file name source file #-c Package #-v Display procedure #-f specify file name after package TAR-CVF Longs.tar longs

    

. tar.gz compression format

In fact, the. tar.gz format is packaged in. tar format and then compressed into. gz format

#-z compressed to. tar.gz Format TAR-ZCVF Compressed package name. tar.gz source file #-x unzip. tar.gz Format TAR-ZXVF Compressed package name. TAR.GZ#-C Specifies the decompression location TAR-ZXVF the package name. Tar.gz-c/tmp/

  

. tar.bz2 Compression Format

In fact, the. tar.bz2 format is packaged in. tar format and then compressed into. bz2 format

#-z compressed to. tar.bz2 Format TAR-JCVF Compressed package name. tar.bz2 source file #-x unzip. tar.bz2 Format TAR-JXVF Compressed package name. TAR.BZ2#-C Specifies the decompression location TAR-JXVF the package name. Tar.bz2-c/TM p/

  

  

"Linux Learning note six" compression decompression command

Related Article

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.