header of tar file - Unix

This is a discussion on header of tar file - Unix ; When files archived as a tar file, does the resultant "tar file" have a header of its own? The archived files have their individual headers, but does the tar file itself has any header telling its size, date modified and ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: header of tar file

  1. header of tar file

    When files archived as a tar file, does the resultant "tar file" have
    a header of its own?
    The archived files have their individual headers, but does the tar
    file itself has any header telling its size, date modified and other
    such things? If it does exist, please tell me its format.


  2. Re: header of tar file

    2007-06-26, 06:44(-00), NMV:
    > When files archived as a tar file, does the resultant "tar file" have
    > a header of its own?
    > The archived files have their individual headers, but does the tar
    > file itself has any header telling its size, date modified and other
    > such things? If it does exist, please tell me its format.


    See
    http://www.opengroup.org/onlinepubs/...g_04_100_13_06

    For the POSIX specification of the ustar format.

    With that tar format at least, there is no global header.

    --
    Stéphane

  3. Re: header of tar file

    NMV writes:

    > When files archived as a tar file, does the resultant "tar file" have
    > a header of its own?


    No.

    > The archived files have their individual headers, but does the tar
    > file itself has any header telling its size, date modified and other
    > such things? If it does exist, please tell me its format.


    You can experiement and see what's going on fairly easily too. Here I
    create two simple text files with one word in them a piece, and tar
    them, and print them out. You see no header to the file.


    user@host ~ $ echo this > this.txt
    user@host ~ $ echo that > that.txt
    user@host ~ $ cat this.txt that.txt
    this
    that
    user@host ~ $ tar cvf thisthat.tar this.txt that.txt
    this.txt
    that.txt


    user@host ~ $ cat thisthat.tar
    this.txt000064400017530001753000000000051064023200 3010675 0ustar useruserthis
    that.txt000064400017530001753000000000051064023201 3010667 0ustar useruserthat


    --
    Todd H.
    http://www.toddh.net/

+ Reply to Thread