tar -xvf file.tar.gz failed with: gzip:stdin:not in gzip format

14,412

@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

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

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

Share:
14,412
Harrison
Author by

Harrison

Updated on June 30, 2022

Comments

  • Harrison
    Harrison almost 2 years

    I tar a set of files with command:tar -czvf file.tar.gz file/ then copy to usb (ext4 format), I checked that I can untar it. After I reinstall system , when mount usb , some error happened , I do fsck /dev/sdc1 and success in mount and copy it to pc. When I untar it tar -xvf file.tar.gz, error happen again:

    gzip: stdin: not in gzip format
    tar : child returned status 1
    tar: Error is not recoverable: exiting now
    

    I have no idea how to rescue the data. Any help needed. Thanks.

  • TekkSparrow
    TekkSparrow about 4 years
    Not until I saw this answer did I realize my wget output was showing my JDK download was only 4kb.
  • fiscblog
    fiscblog almost 4 years
    This seems to be a comment rather than an answer. See stackoverflow.com/help/how-to-answer