Tar命令解压文件报错:stdin has more than one entry

简介:

使用tar命令解压.zip文件的时候,遇到如下异常,

bingyue@ubuntu:~/Documents$ tar -xzvf wls1033_dev.zip
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。

然后解压缩:

bingyue@ubuntu:~/Documents$  unzip wls1033_dev,zip -d weblogic 
解压缩到当前文件夹下的weblogic文件夹下。

遇到的另外一个异常,一起记录下来:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

网上看到的说明:

You used "tar -zxvf" for the second command. the 'z' option tells tar to use gzip to uncompress the file. Since you already uncompressed it in the first command, gzip doesn't know what to do with it, and it consequently croaks. Tar stops because gzip encountered a problem. So, with the file you have now, you would extract it with:
tar -xvf xxxxxx.x.x.tar

这是因为我使用了tar -zxvf进行解压,

去掉 -z参数,就可以了。

 


目录
相关文章
|
12天前
|
Linux
tar命令
`tar`是Linux下强大的文件压缩工具,支持gzip、bz2等格式。基本用法包括:使用`-c`创建归档,`-v`显示详细信息,`-f`指定归档文件名,多个文件或目录间用空格分隔;`-t`查看归档内容,`-r`追加文件,`-x`解压,gzip压缩的加`-z`,bz2加`-j`;`-C`指定解压目录。参数`-u`更新压缩包,`-O`解压到标准输出。注意`-f`通常最后使用,直接跟档案名。
13 5
|
8月前
|
Linux
快速学会tar命令
Linux tar(英文全拼:tape archive )命令用于备份文件。 tar 是用来建立,还原备份文件的工具程序,它可以加入,解开备份文件内的文件。
66 0
|
9月前
|
Ubuntu
Ubuntu中解压出现:bzip2: (stdin) is not a bzip2 file.
Ubuntu中解压出现:bzip2: (stdin) is not a bzip2 file.
248 0
|
10月前
tar解压出错:gzip: stdin: unexpected end of file的解决
tar解压出错:gzip: stdin: unexpected end of file的解决
|
11月前
|
Java Linux
Linux使用解压命令unzip报错:unzip: cannot find zipfile directory in one of xxx.zip
在linux服务器下使用rz上传压缩文件,用unzip命令解压zip包
693 0
|
机器学习/深度学习 Linux Windows
linux:2.3.4 查找/搜索命令(find+grep)+压缩/解压缩命令(gzipbzip2+tar+mv+mkdir)
linux:2.3.4 查找/搜索命令(find+grep)+压缩/解压缩命令(gzipbzip2+tar+mv+mkdir)
170 0
linux:2.3.4 查找/搜索命令(find+grep)+压缩/解压缩命令(gzipbzip2+tar+mv+mkdir)
|
Linux 开发工具
Linux:时间日期指令(date)+查找指令(find,locate,grep)+压缩和解压指令(gzip,gunzip;zip,unzip;tar)(内含详细解释+操作实例)
Linux:时间日期指令(date)+查找指令(find,locate,grep)+压缩和解压指令(gzip,gunzip;zip,unzip;tar)(内含详细解释+操作实例)
165 0
Linux:时间日期指令(date)+查找指令(find,locate,grep)+压缩和解压指令(gzip,gunzip;zip,unzip;tar)(内含详细解释+操作实例)
|
Linux Windows
Linux查找和压缩文件:find、which、whereis、tar(下)
1 查找文件 1.1 find 采用递归方式,根据目标的名称、类型、大小等不同属性进行精细查找。 命令的特点:
207 0
|
Linux
Linux查找和压缩文件:find、which、whereis、tar(上)
1 查找文件 1.1 find 采用递归方式,根据目标的名称、类型、大小等不同属性进行精细查找。 命令的特点:
136 1
|
Linux
Linux解压.zip格式的文件(unzip命令)
Linux解压.zip格式的文件(unzip命令)
470 0