12-21-06 12:21 AM
Hauke Fuhrmann <haf@informatik.uni-kiel.de> wrote:
> Hi there,
>
> anyone has a hint:
>
> I have an uncompressed tar file and need to get it to a tar.gz.
> Looks like tar cannot read from stdin when creating files. is that right?
>
> tar -xvf in.tar --to-stdout | tar czvf out.tar.gz -
> tar: -: Cannot stat: No such file or directory
>
> Second try: pipe to gzip:
> tar -xvf in.tar --to-stdout | gzip > out.tar.gz
>
> This works, but I cannot untar it:
> tar tvzf out.tar.tz
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Archive contains obsolescent base-64 headers
> tar: Read 7265 bytes from out.tar.gz
> tar: Error exit delayed from previous errors
> Return value: 2
>
> What do I do wrong? I need it in this form so that Java can open it,
> because it shall be a jar file.
>
> Best regards,
> Hauke
You have a tar file already, you don't need to tar it again, just:
gzip in.tar
should create in.tar.gz
Jerry
[ Post a follow-up to this message ]
|