加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bash – 如何更新具有gzip压缩的tar文件

发布时间:2020-12-15 20:55:47 所属栏目:安全 来源:网络整理
导读:我执行了: tar -Ppcfz backup.tar.gz on /location/ 这将: 为/ location /创建一个新的tar文件 保留路径, 保留权限, 使用gzip压缩 我需要稍后使用/ location /中尚未添加或未添加的文件更新此tar文件: tar -Ppuf backup.tar.gz /location/ 我收到错误: t
我执行了:

tar -Ppcfz backup.tar.gz on /location/

这将:
为/ location /创建一个新的tar文件
保留路径,
保留权限,
使用gzip压缩

我需要稍后使用/ location /中尚未添加或未添加的文件更新此tar文件:

tar -Ppuf backup.tar.gz /location/

我收到错误:

tar: This does not look like a tar archive tar: Skipping to next
header tar: Archive contains obsolescent base-64 headers tar:
Unexpected EOF in archive tar: Error is not recoverable: exiting now

请帮忙.

解决方法

您也可以在更新时尝试使用-z标志,但我的tar版本报告它无法更新压缩存档.所以你需要gunzip文件,然后用tar更新,然后gzip.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读