Linux tar打包命令

[root@linux ~]# tar -cvf /tmp/etc.tar /etc <==仅打包,不压缩!
[root@linux ~]# tar -zcvf /tmp/etc.tar.gz /etc <==打包后,以 gzip 压缩

[root@linux ~]# tar -jcvf /tmp/etc.tar.bz2 /etc <==打包后,以 bzip2 压缩

tar -xzvf .tar.gz #解压

居然没有安装unzip

yum list |grep unzip

yum install unzip

你可能感兴趣的:(Linux tar打包命令)