Tar & Un Tar File problems

Ask a Question related to Linux / Unix Administration, Design and Development.

  1. #1

    Default Tar & Un Tar File problems

    Hi all,

    I am doing Tar for a set of files using the command :

    tar cf - sri* | compress > x.tar

    When i try to untar using the following command:

    tar xvf x.tar

    It is giving me error:
    tar: tape blocksize error


    NOTE: I tried to tar another set of files and it is giving me this
    error when i untar :
    tar xvf x.tar

    It is giving me error:
    tar: directory checksum error


    I tried to search in other messages.. but did not find any useful
    solution.

    I am working on sun solaris.

    Any help greatly appriciated.

    Thanks and Regards,
    Srinath M. K
    Srinath M.K Guest

  2. Similar Questions and Discussions

    1. LCK file problems
      I have a site i try to edit with contribute 1.0. But when i publish errormessage says "another user has removed your lock". I am the only user on...
    2. PDF File Problems
      I have been putting out a newsletter for a woodworking club I belong to. I have been using Indesign to create the newsletter and then export it to a...
    3. IO File Problems
      hi there, couse of my missing skills with filehandling i would be happy if you provide me help. this is my problem: 1) I´m getting a list...
    4. Problems with File Uploads
      Hello, I've written the following sourcecode: <form action="test.php" method="POST" enctype="multipart/form-data"> <input type="file"...
    5. File problems
      Hi, I am having a hell of a time with this. Whenever I think it's working, something else screws up. There obviously has to be a better way to do...
  3. #2

    Default Re: Tar & Un Tar File problems

    On 12 May 2004 06:01:51 -0700, Srinath M.K <mksrinath@indiatimes.com> wrote:
    >Hi all,
    >
    >I am doing Tar for a set of files using the command :
    >
    >tar cf - sri* | compress > x.tar
    You did a compress here.
    >When i try to untar using the following command:
    >
    >tar xvf x.tar
    You have to uncompress it first or pipe it through uncompress.
    ie. zcat <filename.tar.Z> | tar xvf or uncompress ...| tar xvf
    >It is giving me error:
    >tar: tape blocksize error
    >
    >
    >NOTE: I tried to tar another set of files and it is giving me this
    >error when i untar :
    >tar xvf x.tar
    >
    >It is giving me error:
    >tar: directory checksum error
    --
    slrn is a command line newsreader.
    please reply, to the newsgroup(s).

    slrn Guest

  4. #3

    Default Re: Tar & Un Tar File problems


    Srinath M.K wrote:
    > I am doing Tar for a set of files using the command :
    >
    > tar cf - sri* | compress > x.tar
    >
    > When i try to untar using the following command:
    >
    > tar xvf x.tar
    >
    > It is giving me error:
    > tar: tape blocksize error
    >
    >
    > NOTE: I tried to tar another set of files and it is giving me this
    > error when i untar :
    > tar xvf x.tar
    >
    > It is giving me error:
    > tar: directory checksum error
    >
    >
    > I tried to search in other messages.. but did not find any useful
    > solution.
    >
    > I am working on sun solaris.
    Where did you copy this from? Don't run commands if you don't
    understand what they do.

    If you are running "tar" via compress, the result will be a
    compressed file that obviously tar can't understand.

    $ tar cf - sri* | compress > x.tar
    $ file x.tar
    x.tar: compressed data block compressed 16 bits
    $

    Don't name the compressed file .tar, it should be .tar.Z to indicate
    the compression. To get out of this, use "uncompress".

    /Marcin
    Marcin Dobrucki Guest

  5. #4

    Default Re: Tar & Un Tar File problems

    Srinath M.K wrote:
    > Hi all,
    >
    > I am doing Tar for a set of files using the command :
    >
    > tar cf - sri* | compress > x.tar
    >
    > When i try to untar using the following command:
    >
    > tar xvf x.tar
    >
    > It is giving me error:
    > tar: tape blocksize error
    >
    >
    > NOTE: I tried to tar another set of files and it is giving me this
    > error when i untar :
    > tar xvf x.tar
    >
    > It is giving me error:
    > tar: directory checksum error
    >
    >
    > I tried to search in other messages.. but did not find any useful
    > solution.
    >
    > I am working on sun solaris.
    >
    > Any help greatly appriciated.
    >
    > Thanks and Regards,
    > Srinath M. K
    yes it gives errors because u piped to compress....so it's not a plain tar file any longer...
    u have to "uncompress" first then use the tar...
    i.e
    zcat <your_file> | tar xvf -

    but I would say use gzip instead of compress...

    RP
    Arpad I Toth Guest

  6. #5

    Default Re: Tar & Un Tar File problems

    ["Followup-To:" header set to comp.unix.admin.]
    On 12 May 2004 06:01:51 -0700, Srinath M.K
    <mksrinath@indiatimes.com> wrote:
    > Hi all,
    >
    > I am doing Tar for a set of files using the command :
    >
    > tar cf - sri* | compress > x.tar
    >
    If you use GNU tar, you can
    tar czf x.tar.gz sri*
    tar xzvf x.tar.gz


    --
    Now KEN and BARBIE are PERMANENTLY ADDICTED to MIND-ALTERING DRUGS ...
    Bill Marcum Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139