Verify the integrity of the tar file with tarfile module?

Ramchandra Apte maniandram01 at gmail.com
Thu Aug 16 10:51:34 EDT 2012


Just opening the file may not create an error.
You have to read some files to check for errors.

On 15 August 2012 20:29, rudson alves <rudsonalves67 at gmail.com> wrote:

> Hello,
>
> I took a Slackware package file .tar (uncompressed) and edited with random
> characters to generate any error in its structure, as shown in the test
> bash below:
>
> $ tar -tf zoo.tar
> ./
> install/
> install/slack-desc
> tar: Pulando para o próximo cabeçalho
> tar: Exiting with failure status due to previous errors
> $ echo $?
> 2
>
> How can I verify the integrity of the tar file with tarfile module without
> having to expand it?
>
> To be more precise, even expanding this file it not generated any error
> message.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120816/90ae4321/attachment.html>


More information about the Python-list mailing list