[news.newusers.questions] FTP / How do I determine file type?

HUFF@kuhub.cc.ukans.edu (Steve Huff, U. of Kansas, Lawrence) (01/09/90)

I'm sure this has been asked before, sorry for the repeat.

When I am FTP'ng, how do I determine what type the file I am
'get'ng is?  For example, I tried to get a file with the extension
	TAR.Z

as a binary file, but received garbage.  Can somebody please tell
me how to do this correctly?  Is there a file somewhere on how to
use FTP?  Thanks.

Please e-mail or post replies.

Steve

----------------------------------------------------------------  
If the opposite of pro is con, what is the opposite of progress?

Steve Huff
Internet:  HUFF@kuhub.cc.ukans.edu
Bitnet:    HUFF@ukanvax.BITNET
EmCon:     K1TR  or  KW02   (If you have access, please say so!)
----------------------------------------------------------------- 

eps@toaster.SFSU.EDU (Eric P. Scott) (01/09/90)

In article <20950@kuhub.cc.ukans.edu> HUFF@kuhub.cc.ukans.edu
	(Steve Huff, U. of Kansas, Lawrence) writes:
>When I am FTP'ng, how do I determine what type the file I am
>'get'ng is?

It's not always possible.  If there's a "README" file in the
directory, get it (ASCII) and read it first.

Between _identical_ operating systems it's a non-issue; most UNIX
systems can use BINARY for everything; DEC-20s can use PAGE
structure; VMS sites running MultiNet can use the STRU O VMS
extension.  But these are special cases.  The heterogeneous
nature of the Internet often leads to...  "ya just gotta know."

>             For example, I tried to get a file with the extension
>	TAR.Z
>
>as a binary file, but received garbage.

You must use BINARY (or TENEX, if appropriate) mode to transfer
.Z files--these are Lempel-Ziv compressed.  If you try looking at
them "raw" they will look like garbage.  They can be recognized
by their first three bytes; for 16-bit compression, they will be
(hex) 1F 9D 90.  You will need an "uncompress" program to
recover the original data (which your site should have, possibly
as part of its usenet software).

					-=EPS=-