|
Home > Archive > Unix administration > May 2004 > Tar & Un Tar File problems
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Tar & Un Tar File problems
|
|
| Srinath M.K 2004-05-12, 9:43 am |
| 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
| |
| Marcin Dobrucki 2004-05-12, 9:43 am |
|
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
| |
| Arpad I Toth 2004-05-12, 10:38 am |
| 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
| |
| Bill Marcum 2004-05-12, 2:56 pm |
| ["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 ...
|
|
|
|
|