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