我用这个命令解压tar -pxvzf filename.tar.gz
,一切似乎都很好,但它意外地退出并出现以下错误。我收到此错误和/或阻止它的原因是什么?
tar: Exiting with failure status due to previous errors
按照回复者的建议删除了 -v。这是输出错误(见下文)。这是 joomla cms 站点的备份。知道是什么原因导致这些错误吗?我唯一能想到的是缓存和 tmp 文件夹可能会导致它出现奇怪的字符
tar: Archive contains `nsion.pd' where numeric mode_t value expected
tar: Archive contains `Party.pd' where numeric mode_t value expected
tar: Archive contains `manent C' where numeric mode_t value expected
tar: Archive contains `ial Circ' where numeric mode_t value expected
tar: Archive contains `pdf0444' where numeric mode_t value expected
tar: Archive contains `pring 20' where numeric mode_t value expected
tar: Archive contains `.pdf444' where numeric mode_t value expected
tar: Archive contains `pdf0444' where numeric mode_t value expected
tar: Archive contains `up from ' where numeric mode_t value expected
tar: Archive contains `ting.pdf' where numeric mode_t value expected
tar: Archive contains `on.pdf4' where numeric mode_t value expected
tar: Archive contains `f100444' where numeric mode_t value expected
tar: Archive contains `ptions t' where numeric mode_t value expected
tar: Archive contains `f100444' where numeric mode_t value expected
tar: Archive contains `pdf0444' where numeric mode_t value expected
tar: Archive contains `f100444' where numeric mode_t value expected
tar: Archive contains `ter.pdf' where numeric mode_t value expected
tar: Archive contains `ted.pdf' where numeric mode_t value expected
tar: Archive contains `df00444' where numeric mode_t value expected
tar: Archive contains `Inc..pdf' where numeric mode_t value expected
tar: Archive contains `d.pdf44' where numeric mode_t value expected
tar: Archive contains `Network.' where numeric mode_t value expected
tar: Archive contains `df00444' where numeric mode_t value expected
tar: Archive contains `rship Aw' where numeric mode_t value expected
tar: Archive contains `.pdf444' where numeric mode_t value expected
tar: Archive contains `ition.pd' where numeric mode_t value expected
tar: Archive contains `df00444' where numeric mode_t value expected
tar: Archive contains `9.pdf44' where numeric mode_t value expected
tar: Archive contains `1.pdf4' where numeric mode_t value expected
tar: Exiting with failure status due to previous errors
答案1
您的命令将首先调用解tar
压缩gunzip
文件。您可以使用两个命令来检查可能的错误,例如文件损坏,如下所示:
$ gunzip filename.tar.gz
上述命令将生成文件filename.tar
。然后,您可以使用:
$ tar -pxvf filename.tar
这应该有助于您调试问题。您还可以-v
从命令中删除以禁用文件列表,这可能有助于您仅关注错误消息。