[comp.unix.questions] More tar help

P_SECINARO@unhh.unh.edu (02/13/91)

        I noticed a posting recently dealing with tar and .Z files.
Well, I seem to be having some problems of my own in this area.  I'm
running SVR3.2 on a 386 PC and it doesn't have compress.  Since there
are a number of .Z files I'd like to have, I tried downloading the
source code for compress - in an uncompressed .tar file -
from an FTP site.  The problem is I can't get tar to work either.  I
keep getting errors like "Not a tar archive" and "Bad magic string".
        When I process the same file on a VAX running Ultrix, I have no
problems with uncompress or tar, though I don't have enough disk space
in my user account to detar the files fully, so this is also an
unsatisfactory approach.
        Is there something wrong with System V/386 R3.2 tar (AT&T version 2.0)?
Or am I somehow downloading the files incorrectly?  I downloaded the tar file
as ASCII and the compress files as binary onto a VMS system (on which I do
have plenty of space) and then transferred them over to my system via
Kermit.

Paul Secinaro

P_SECINARO@UNHH.UNH.EDU

weimer@garden.kodak.COM (Gary Weimer (588-0953)) (02/13/91)

In article <25945@adm.brl.mil>, P_SECINARO@unhh.unh.edu writes:
:
:
|> Or am I somehow downloading the files incorrectly?  I downloaded the
tar file
|> as ASCII and the compress files as binary onto a VMS system (on which I do
|> have plenty of space) and then transferred them over to my system via
|> Kermit.

tar files also have control characters and cannot be downloaded as ASCII.

weimer@ssd.kodak.com ( Gary Weimer )

gwyn@smoke.brl.mil (Doug Gwyn) (02/14/91)

In article <25945@adm.brl.mil> P_SECINARO@unhh.unh.edu writes:
>I downloaded the tar file as ASCII ...

Don't do that!  "tar" files will be corrupted unless you download them
in binary (image) mode.

jik@athena.mit.edu (Jonathan I. Kamens) (02/15/91)

In article <1991Feb14.170407.1422@unicorn.cc.wwu.edu>, n8743196@unicorn.cc.wwu.edu (Jeff Wandling) writes:
|> gwyn@smoke.brl.mil (Doug Gwyn) writes:
|> 
|> >In article <25945@adm.brl.mil> P_SECINARO@unhh.unh.edu writes:
|> >>I downloaded the tar file as ASCII ...
|> 
|> >Don't do that!  "tar" files will be corrupted unless you download them
|> >in binary (image) mode.
|> 
|> Oh yea? What's the difference between foo.tar and foo.tar.Z ?

  I would like to politely suggest that you take a slightly less
confrontational tone, especially when you're contradicting Doug Gwyn about
something concerning Unix.  Because, in the vast majority of cases, when you
contradict Doug Gwyn about something concerning Unix, you're the one that's
wrong, not Doug.

  And, indeed, in this case, you're wrong.

  The difference between foo.tar and foo.tar.Z is that the latter is
compressed and the former is not.  This has almost nothing to do with the
question at hand, which is whether or not a tar archive can contain characters
that would get mucked up by an ftp ASCII-mode transfer.

  The answer to that question is yes.

  Ignoring all the things that ftp is *allowed* and *supposed* to do during an
ASCII transfer which may interfere with the transfer of binary files, I will
quote from the BUGS section of the man page for the ftp we have installed on
our machines (I believe it's from the 4.3tahoe sources, but I'm not certain):

     An error in the treatment of carriage returns in the 4.2BSD
     UNIX ascii-mode transfer code has been corrected.  This
     correction may result in incorrect transfers of binary files
     to and from 4.2BSD servers using the ascii type.  Avoid this
     problem by using the binary image type.

|> I've been able to send tar files through the net with no problem. It's
|> for the compressed files that I need to set 'bin'ary mode.

  Then you've been lucky.

|> Example:
|> 
|> tar cf - . | rsh other_host dd of=home.tar

  What does this have to do with what we are talking about?

  We're talking about using *FTP* to download files.  What does your example,
using rsh, have to do with FTP transfers?

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710

gwyn@smoke.brl.mil (Doug Gwyn) (02/15/91)

In article <1991Feb14.170407.1422@unicorn.cc.wwu.edu> n8743196@unicorn.cc.wwu.edu (Jeff Wandling) writes:
>What kind of tar file is Doug talking about?

One being FTPed, as the original poster indicated.