1:解压
tar -zxvf ****.zip
-zxvf:z表示解压的文件是gz类型,x表示是解压(c是创建一个压缩包),v表示显示解压进度,f表示指定文件名
如果报这个错的话
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
原因是:
tar命令是调用了gunzip命令的,
对只有一个压缩内容的文件来解压的时候才用tar, 而如果压缩包里有多个文件被压缩了,
tar命令不能继续工作。可以采用unzip命令去解压。
但是用unzip要先安装unzip,系统为centos
sudo yum install -y unzip zip
unzip 要解压的压缩包 -d 压缩后放到哪