使用tar解压文件提示gzip: stdin: not in gzip format错误

1. 问题描述

使用docker save xxxx > xxx.tar导出镜像,由于文件太大,需要split -b 3000m xxx.tar来分割文件,刻录到光盘然后导入到服务器上。

后面使用cat * | tar -xzv来解压压缩的镜像,随后使用docker load导入镜像。

开始的几次都没有问题,不过昨天同样的过程,提示gzip: stdin: not in gzip format

2. 问题原因

网上搜了一下,找到了这个网页,意思是这个文件不是gzip格式的,使用tar -xvf来解压就好了。于是尝试了一下,倒是执行成功了,但是解压出来一堆的文件夹,而不是一个镜像文件。

于是求教于同事,把上面整个过程重复了一下,然后发现了问题所在。开始几次没有问题,是因为我多了一个tar的过程。我把几个镜像放入了一个文件夹里,然后压缩了文件夹;最后一次失败了,是因为我使用docker save之后直接split了,没有tar的这个过程。所以解压的是一个image文件,才会解压出一堆的文件夹。

3. 解决方式

知道了原因,想解决办法就好。image文件被split,后面只需要合并就好了,合并后即可load镜像。命令如下:

cat xx* > image.tar

使用tar解压文件提示gzip: stdin: not in gzip format错误的更多相关文章

  1. Linux:用tar解压文件出现错误Not found in archive

    问题:用tar解压文件出现错误Not found in archive 解决办法:加上-C参数  tar -zxvf ZenTaoPMS.8.1.3.zbox_64.gz -C /usr 因为压缩文件 ...

  2. linux tar 解压文件时指定文件名

      linux解压文件时指定文件夹名称   wget -O mysql-5.6.15.tar.gz  http://oss.aliyuncs.com/aliyunecs/onekey/mysql/my ...

  3. 使用tar解压文件报归档中找不到

    1.今天使用tar命令解压jdk安装包时,报如下错误.tar -zxvf jdk-8u181-linux-x64.tar.gz /usr/local/java/ 2.后来查了一下,因为我解压当前的文件 ...

  4. tar zxvf 解压文件提示错误

    1.tar -zxvf 提示错误 2. 查看文件之后发现是html格式的.file **(文件名) 3.原来是直接之前sudo wget url ...url连接错误了. 这个url直接在jdk哪里, ...

  5. 解压tar.gz文件报错gzip: stdin: not in gzip format解决方法

    解压tar.gz文件报错gzip: stdin: not in gzip format解决方法 在解压tar.gz文件的时候报错 1 2 3 4 5 [Sun@localhost Downloads] ...

  6. 解压压缩文件报错gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

    压缩包是直接weget 后面加官网上的tar包地址获取的  [root@xuegod43 ~]# tar -zxvf /home/hadoop/hadoop-2.6.5-src.tar.gz gzip ...

  7. tar解压问题gzip: stdin: not in gzip format

    如下所示,使用tar -zxvf解压文件时遇到"gzip: stdin: not in gzip format"等错误: [root@DB-Server tmp]# [root@D ...

  8. 解压.tar.gz出错gzip: stdin: not in gzip format tar: /Child returned status 1 tar: Error is not recoverable: exiting now

    先查看文件真正的属性是什么? [root@xxxxx ~]# tar -zxvf tcl8.4.16-src.tar.gz  gzip: stdin: not in gzip format tar: ...

  9. linux下centos解压时报错: gzip: stdin: not in gzip format   tar: Child returned status 1   tar: Error is not recoverable: exiting now

    最近在linux下安装python时,解压Python.tgz文件时遇到一个问题:          gzip: stdin: not in gzip format      tar: Child r ...

随机推荐

  1. 未将对象引用设置到对象的实例 IIS

    CMD C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

  2. Scratch儿童项目式编程--接球游戏 Scratch children program programming - catching a ball

    Scratch儿童项目式编程--接球游戏 Scratch children program programming - catching a ball 作者:韩梦飞沙 Author:han_meng_ ...

  3. pwcrack--一款集合多种md5解密的工具

    项目开源地址:https://github.com/L-codes/pwcrack-framework Ruby2.5+ (tested with Ruby2.5.3 & Ruby 2.6.3 ...

  4. java.sql.SQLException: Error setting driver on UnpooledDataSource.Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for IStudentDaoMapper.Mapperdao.selectcou

    是因为 Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for ...

  5. Android MediaPlayer架构 -- MediaPlayer的创建过程

    本文系作者自己学习之所用,文章内容仅出自作者拙劣之思考,问题之处烦请不吝指教. MediaPlayer 能被用来控制音/视频文件或流媒体的回放.Android中以MediaPlayer类作为音视频播放 ...

  6. unity无限循环报错的定位

    晚上遇到了,碰到了程序一运行就卡住的尴尬问题,然后百度下,看了看,Get到了一个新的skill. 1. 打开对应的VS程序,选择“调试/Attach Unity Debuger”菜单来调试代码. 2. ...

  7. 【熊掌号mip插件】织梦DEDECMS百度熊掌号mip改造教程

    第一部分:模板修改 1.js部分:删除或使用现有组件替换 2.调用百度mip文件: head里加<link rel="stylesheet" type="text/ ...

  8. Java基础之理解Annotation

    一.概念 Annontation是Java5开始引入的新特征.中文名称一般叫注解.它提供了一种安全的类似注释的机制,用来将任何的信息或元数据(metadata)与程序元素(类.方法.成员变量等)进行关 ...

  9. 让.Net程序支持命令行启动

    很多时候,我们需要让程序支持命令行启动,这个时候则需要一个命令行解析器,由于.Net BCL并没有内置命令行解析库,因此需要我们自己实现一个.对于简单的参数来说,自己写一个字符串比较函数来分析args ...

  10. c++文件打包工具实现

    没事做就来写一个打包的工具吧.很多是网络上面找的,只是我把他修改一下合并在一起. // PacketFile.cpp : 定义控制台应用程序的入口点. #include "stdafx.h& ...