Linux 压缩解压文件

1.将当前目录下所有.txt文件打包并压缩归档到文件this.tar.gz,我们可以使用   

tar czvf this.tar.gz ./*.txt

 

2.如果只需要压缩一个文件夹的话,我们可以使用

tar czvf this.tar.gz ./文件名

3.将当前目录下的this.tar.gz中的文件解压到当前目录我们可以使用   

tar xzvf this.tar.gz ./
原文地址:https://www.cnblogs.com/blts/p/9566209.html