Gzip 壓縮工具
[root@binbinlinux ~]# gzip install.log.syslog 壓縮指令gzip 不可以壓縮目錄
[root@binbinlinux ~]# ls
0.txt 1234.1 1.txt anaconda-ks.cfg test.txt
1 123.txt 222 install.log tmp
111 12.txt 234 install.log.syslog.gz 壓縮的檔案帶gz yun
[root@binbinlinux ~]# du -sh install.log.syslog.gz
8.0K install.log.syslog.gz
[root@binbinlinux ~]# gzip -1 壓縮比例最少 然後壓縮速度最快 9 壓縮比例最大 壓縮速度最慢 默然是6 級别 一共9級别
[root@binbinlinux ~]# gzip -d install.log.syslog.gz 解壓縮指令 -d
0.txt 1234.1 1.txt anaconda-ks.cfg test.txt
1 123.txt 222 install.log tmp
111 12.txt 234 install.log.syslog yun
Gzip -c 1.sh。Gz > /usr/local/src/1.sh 輸出的意思 從定向的意思
Bzip2
[root@binbinlinux ~]# bzip2 install.log.syslog 壓縮檔案指令 不可以壓縮目錄
0.txt 1234.1 1.txt anaconda-ks.cfg test.txt
1 123.txt 222 install.log tmp
111 12.txt 234 install.log.syslog.bz2 yun
[root@binbinlinux ~]# du -sh install.log.syslog.bz2
8.0K install.log.syslog.bz2
[root@binbinlinux ~]# bzip2 -d install.log.syslog.bz2 解壓指令
[root@binbinlinux ~]# bzcat test.txt.bz2 檢視bzip2 壓縮的檔案
[root@binbinlinux ~]# zcat install.log.syslog.gz 檢視 gz壓縮的檔案
Xz壓縮
[root@binbinlinux ~]# xz 123.txt 壓縮指令
0.txt 111 123.txt.xz 1.txt 234 install.log test.txt yun
1 1234.1 12.txt 222 anaconda-ks.cfg install.log.syslog tmp
[root@binbinlinux ~]# xz -d 123.txt.xz 解壓縮