Professional Web Applications Themes

Tar & Un Tar File problems - Linux / Unix Administration

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. ...

  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. #2

    Default Re: Tar & Un Tar File problems

    On 12 May 2004 06:01:51 -0700, Srinath M.K <mksrinathindiatimes.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

  3. #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

  4. #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

  5. #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
    <mksrinathindiatimes.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

Similar Threads

  1. File creation problems
    By four-ks in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 2
    Last Post: July 24th, 03:54 AM
  2. LCK file problems
    By Gronning in forum Macromedia Contribute General Discussion
    Replies: 8
    Last Post: October 12th, 07:13 AM
  3. PDF File Problems
    By Stephen DiCenso in forum Adobe Acrobat Macintosh
    Replies: 0
    Last Post: February 2nd, 11:55 PM
  4. IO File Problems
    By Perldiscuss - Perl Newsgroups And Mailing Lists in forum PERL Beginners
    Replies: 2
    Last Post: January 21st, 06:16 PM
  5. File problems
    By Beauford.2005 in forum PHP Development
    Replies: 0
    Last Post: July 18th, 11:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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