2015/03/27 Compression and reconciliation package

Source: Internet
Author: User

I. GZIP Compression and reconciliation package

1. Compression;

[[Email protected] ~]# gzip 2.txt

2. Unpacking;

[Email protected] ~]# gzip-d 2.txt.gz

3. View the contents of the package compression;

[Email protected] ~]# Zcat 1.txt.gz

Ii. bZIP Compression and reconciliation package

1. Compression;

[Email protected] ~]# bzip2 2.txt

2. Unpacking;

[Email protected] ~]# bzip2-d 2.txt.bz2

3. View the contents of the compressed package;

[Email protected] ~]# Bzcat 2.txt.bz2

Three, zip compression and reconciliation package

1. Compression;

[Email protected] ~]# zip 2.zip 2.txt [[email protected] ~]# zip-r etc.zip/etc #压缩目录

2. Unpacking;

[Email protected] ~]# unzip etc.zip [[email protected] ~]# unzip-d/tmp etc.zip #解压到/tmp

3. View the contents of the compressed package;

[Email protected] ~]# unzip-l etc.zip

Iv. tar compression and reconciliation package

1. Compression

[[email protected] ~]# TAR-ZCVF 1.tar.zg/etc[[email protected] ~]# TAR-JCVF 1.tar.bz2/etc[[email protected] ~]# tar-c VF 1.tar/etc[[email protected] ~]# tar-cvf 1.tar--exclude "*.sh"-exclude "*i386"/etc #exclude排除文件

2. Unpacking

[[email protected] ~]# TAR-ZXVF 1.tar.zg[[email protected] ~]# tar-jxvf 1.tar.bz2[[email protected] ~]# TAR-XVF 1.tar [ [Email protected]tos1 ~]# tar-xvf 1.tar-c/tmp #解压到/tmp

3. View the compressed content

[Email protected] ~]# TAR-TF 1.tar #查看包的内容

This article is from the Chen. "Blog, reprint please contact the author!"

2015/03/27 Compression and reconciliation package

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.