linux – 当我的文件可能损坏时,如何从这个tar文件中提取?

前端之家收集整理的这篇文章主要介绍了linux – 当我的文件可能损坏时,如何从这个tar文件中提取?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
尝试从tar文件提取所有文件时,我收到以下错误消息:
tar: Skipping to next header
tar: Error exit delayed from prevIoUs errors

在打印此错误消息之前,某些文件会正确提取,并且该过程会生成一个似乎包含其余存档的乱码文件.此存档中的所有文件都是文本文件.

有什么我可以尝试恢复其余的文件

解决方法

您可以使用-i选项尝试提取以忽略零:
The --ignore-zeros (-i) option causes tar to ignore blocks of zeros in
the archive. Normally a block of zeros indicates the end of the archive,but when reading a damaged archive,or one which was created by cat-ing
several archives together,this option allows tar to read the entire
archive. This option is not on by default because many versions of tar
write garbage after the zeroed blocks.
原文链接:https://www.f2er.com/linux/399922.html

猜你在找的Linux相关文章