I have a rather large tar.gz file (17GB) which is a tar.gz version of a directory. The problem here is I got the following message after the tar operation.

tar: Error exit delayed from previous errors

Now since it takes a long time to download, I just want to be sure that the file is healthy before downloading it. Is there a way to make sure of the file's integrity which does not take a lot of time?

Currently all the checking solutions that I found take a lot of time to complete.

  • 6
    I don't think you can assume that; tar is reporting that something went wrong, you just don't know what (at least based on only that output). Adding the v flag and recreating the archive may provide additional details (if it's too much output, redirect stdout to /dev/null but keep stderr, like tar cfv my.tar.gz whatever/ >/dev/null). Are you sure it isn't something silly like some file can't be read, or you running out of disk space on the target filesystem? – a CVn Aug 11 '13 at 10:40
  • @MichaelKjörling tar cfv my.tar.gz whatever/ >/dev/null is overkill, simply run tar cf my.tar.gz whatever/ edit: should be tar czf my.tar.gz whatever/ actually. – jlliagre Aug 11 '13 at 13:33
  • You could also redirect everything to a file (tar czf my.tar.gz whatever/ >tar.log 2>&1) or pipe to a pager (tar czf my.tar.gz whatever/ 2>&1 | less). – user26112 Aug 11 '13 at 14:08
  • 2
    Does the packager made a checksum? If he did just running md5sum my.tar.gz and comparing with the sites values. – Braiam Aug 11 '13 at 14:26
  • @Braiam That won't help unless the OP repackages the archive on the remote end. The question is about whether the archive file can be trusted before downloading it, because the download will take a long time. – a CVn Aug 11 '13 at 16:29

You cannot assume the tar.gz file is healthy but IMHO chances it is are quite good.

A very common root cause of the "Error exit delayed from previous errors" is the fact a file has either its size changed while processed or has disappeared just before. Depending on what kind of files your archive contains, this can be a non issue. In any case, tar is properly processing this kind of event and the archives created should be usable.

Next time you create your archive, I would suggest to forget the v (verbose) option or redirect stdout to a file. While it is useful for small archives containing a dozen files or so, it adds a useless noise to tar output and you'll then have the error messages, if any, on screen and not lost in the terminal emulator scrollback.

tar czvf large.tar.gz someDirectory >/tmp/large.tar.list

Of course, there is no 100% guarantee your tar.gz file is healthy. The only way to know it would be to extract it somewhere and see if no error show up. Even if it is the case, there is still the possibility some files weren't saved because of access rights issues, or more odd ones like file names / path names too long or invalid, corrupt file systems, corrupt transmission, etc ...


In my experience tar: Error exit delayed from previous errors usually means that the gzip spawned on the tarring process had an error (usually that file being added changed contents as it was being put in to the tar) and the above error is given.

This would probably constitute as a "failed archive" (the file may be different, missing or broken in your tar). For large volumes of (changing) content, i would suggest using rsync to copy the files across instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.