Quote:
Originally Posted by J65nko
You could check if the file/archive is corrupted with the utility file(1)
|
Actually, file is not likely to tell you the file is corrupt. It only tries to guess the type of file it is based on a few magic numbers found at the start of the file. Any corruption outside of what it looks at will go unnoticed.
Quote:
Then do a verbose test with tar(1)
|
Actually, the
t option to tar just does a listing; with the z flag it knows to un-gzip first, and so this is probably a decent pragmatic test.
A direct test of the compressed file can be done with gzip in test mode:
% gzip -tv foo.tgz
Of course this doesn't test the contained tar archive. You could also compare with an independent checksum.