Verify the integrity of the tar file with tarfile module?

Discussion in 'Python' started by rudson alves, Aug 15, 2012.

  1. rudson alves

    rudson alves Guest

    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.
    rudson alves, Aug 15, 2012
    #1
    1. Advertising

  2. rudson alves

    Dave Angel Guest

    On 08/16/2012 10:51 AM, Ramchandra Apte wrote:
    > Just opening the file may not create an error.
    > You have to read some files to check for errors.


    You have no context in front of your message, and it's not a reply to
    anything existing. So it must be top-posted. Try again.



    --

    DaveA
    Dave Angel, Aug 16, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Doucleff
    Replies:
    5
    Views:
    476
    Tom B.
    Aug 27, 2004
  2. Claudio Grondi
    Replies:
    4
    Views:
    550
    Claudio Grondi
    Aug 20, 2005
  3. Replies:
    3
    Views:
    444
    =?iso-8859-1?q?Lars_Gust=E4bel?=
    Aug 28, 2005
  4. m_ahlenius
    Replies:
    2
    Views:
    273
    m_ahlenius
    Feb 8, 2010
  5. m_ahlenius
    Replies:
    9
    Views:
    516
    m_ahlenius
    Aug 21, 2010
Loading...

Share This Page