tar -xvf file.tar.gz失败,原因是:gzip:stdin:not in gzip format

sit*_*exa 2 gzip tar

我用命令tar压缩了一组文件:tar -czvf file.tar.gz file/然后复制到usb(ext4格式),我检查了是否可以解压缩它。重新安装系统后,在挂载usb时发生了一些错误,我fsck /dev/sdc1成功安装了并将其复制到pc。当我解压缩它时tar -xvf file.tar.gz,错误再次发生:

gzip: stdin: not in gzip format
tar : child returned status 1
tar: Error is not recoverable: exiting now
Run Code Online (Sandbox Code Playgroud)

我不知道如何挽救数据。需要任何帮助。谢谢。

nag*_*tod 5

@sitexa , I got this error when file is not fully downloaded(transferred).

tar xvfz apache-tomcat-8.5.12.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Run Code Online (Sandbox Code Playgroud)

This error is coming due to file is not completely downloaded.

reference : https://ubuntuforums.org/showthread.php?t=1319801