[comp.sys.apple2] FTP's

v063jc9a@ubvmsd.cc.buffalo.edu (Dan Barcomb) (09/20/90)

	Ok, I'd like to get this straightened out for myself once and for all.
Ok here's the questions on using FTP's:

		When d/l a .bsq.Z file do I set it to "file", "binary" or
"ascii"?  
		Then, when I use Kermit (ugh..) to u/l the file to my Apple IIgs
do I set the file type to ascii or binary?
		Using Kermit in Proterm on the receiving end, do I use:
			1: file or batch
			2. What do I set the default filetype to?

(an example of where .bsq.Z files are found is Wuarchive.wustl.edu)
And...  Do I use GSHK first or Binascii?

		Also, what do I do for plain .shk files?
Thanks alot for all your help...  I've been trying to figure it all out, but
I have too much work (don't we all!) to spend too much time...

					Thanks!
			
						Dano

dcw@lcs.mit.edu (David C. Whitney) (09/20/90)

In article <36896@eerie.acsu.Buffalo.EDU> v063jc9a@ubvmsd.cc.buffalo.edu writes:
>
>	Ok, I'd like to get this straightened out for myself once and for all.
>Ok here's the questions on using FTP's:

An here's an answer (I hope):

FTP allows people to send stuff across networks (pretty much just the
internet, though - although there are facilities for getting stuff to
BITNET folks). Most of this stuff is just text or text-encoded
binaries. Some of it is just binaries.

FTP defaults to a mode for transferring TEXT (so does Kermit). If the
file you want has a suffix of ".txt" or ".bsc" or ".uu" or ".shar"
then you can transfer it using text mode. In fact, most files will go
OK in text mode.

If the filename has a suffix of ".shk" or ".Z" or ".tar" then you MUST
go into binary mode (type "binary" to the FTP or Kermit prompt) before
transferring.

".Z" files have been compressed with the unix "compress" utility. The
unix "uncompress" utility or Shrinkit GS (not regular Shrinkit!) can
uncompress such files.

".tar" is a unix tape archive. The unix utility "tar" can extract the
files stored in the archive. I *think* that tar does no encoding or
compression, so tar archives of binscii files do not need to be
untar'ed before running through binscii (someone else apparently has
done this without problems).

".shk" files are shrinkit archives which can be unpacked using
Shrinkit (regular or GS).

--

Any text file containing a line which reads "FiLeStArTfIlEsTaRt" is a
file holding BinSCII-encoded segments. Run BinSCII or the unix utility
"sciibin" on such files to extract the binary data within.

Kermit was designed to be able to send binary data over 7-bit lines.
This is pretty inefficient, so Kermit defaults to text mode. You must
type "binary" to BOTH Kermits before transferring binary data.

Hope this has been helpful...

--
Dave Whitney			| I wrote Z-Link and BinSCII. Send me bug
Computer Science MIT 1990	| reports. I need a job. Send me an offer.
dcw@goldilocks.lcs.mit.edu	| My opinions, you hear? MINE!
dcw@athena.mit.edu		| Are you sure you know what you're doing?

GRAY@ADMIN.HumberC.ON.CA (Kelly Gray) (09/20/90)

I've been working on getting some of the technical notes from Apple.com
by way of the BITFTP server. I now have a problem with one of the files.
I recieved the index from the technotes section, and I find it is a
uuencoded file. How do I go about decoding it? I'm using a VM system
here, so I don't have the unix UUDECODE command available. Is there a
program I can get for my //e that will decode this, or do I have to
find a unix system to upload the stuff to for decoding?

     <o_o>
 _________________________   ________________________________________
/                         \ /                                        \
|        Kelly Gray        |  The opinions expressed in the preceding |
|                          |  message are not guaranteed to represent |
| GRAY@ADMIN.HumberC.ON.CA |  any form of rational thought whatsoever |
\_________________________/ \_________________________________________/

cwilson@NISC.SRI.COM (Chan Wilson [Animal]) (09/27/90)

In article <36896@eerie.acsu.Buffalo.EDU> v063jc9a@ubvmsd.cc.buffalo.edu writes:
>
>	Ok, I'd like to get this straightened out for myself once and for all.
>Ok here's the questions on using FTP's:
>
>		When d/l a .bsq.Z file do I set it to "file", "binary" or
>		"ascii"?  

	I presume by 'd/l' you mean ftp, yes?  Set binary mode when ftp'ing
	*.Z files, by simply typing 'bin' to the ftp> prompt.

>		Then, when I use Kermit (ugh..) to u/l the file to my Apple 
>		IIgs do I set the file type to ascii or binary?

	Depends.  If you uncompress the file on the host end before
	kermit'ing (the host you ftp'd the file to), the file is now a
	binscii'd shrinkit archive, and is now ascii.  If you don't uncompress
	the file, it is still 8bit binary.

>		Using Kermit in Proterm on the receiving end, do I use:
>			1: file or batch
>			2. What do I set the default filetype to?

	1 & 2: either/anything, it shouldn't matter.  I don't use kermit
	<YUCKO! get zmodem or something civilized>, so the kermit gurus
	can help if this is incorrect.

>(an example of where .bsq.Z files are found is Wuarchive.wustl.edu)

	Yup.  Which needs to updated, since I haven't done anything for
	a couple months.  oops.

>And...  Do I use GSHK first or Binascii?

	Well, this depends on what you did to the file before you transferred
	it to your GS.  If you uncompressed it before you transferred it,
	you now have a *.bsq file, which is a binscii'd shrinkit archive,
	so you'll need to un-binscii it, then un-shrinkit.  If you didn't 
	uncompress it before transferring, you'll have to uncompress it 
	using GSHK, un-binscii the resulting (*.bsq) file, then un-shrink
	the resulting *.SHK file.

>		Also, what do I do for plain .shk files?

Ooops, are there some of those there?  Sorry, thought I'd caught them all.
Ideally, you should be able to use binary ftp and binary kermit to transfer
them to your GS, then simply run Shrinkit to unshrink them.  Cuts out the
binscii step.  Of course, you can also unbinscii the files on the host
side, before you transfer it to your GS.  It's actually TONS easier to 
do this if at all possible, for you can do something really fun like
'(zcat *.bsq.Z|sciibin) && rm *.bsq.Z' which leaves you with all your 
ftp'd stuff in Shrinkit archives (*.SHK) ready for some sort of transfer
to your GS.  

>Thanks alot for all your help...  I've been trying to figure it all out, but
>I have too much work (don't we all!) to spend too much time...

No problem, 'bout time I explained this stuff anyhow.  This reminds me, 
I believe it's time for another stab at a monthly posting that explains 
this stuff:

*******************************************************************************
A FORMAL CALL FOR ALL STUPID (sorry, UNENLIGHTENED) QUESTIONS (WITH ANSWERS, 
 IF POSSIBLE) TO BE PLACED INTO A MONTHLY POSTING ON COMP.SYS.APPLE2.

      >>>>   Mail all candidates to cwilson@nisc.sri.com    <<<<

*******************************************************************************

Enjoy:

--Chan

			   ................
    Chan Wilson -- cwilson@nisc.sri.com <!> I don't speak for SRI.
Janitor/Architect of comp.binaries.apple2 archive on wuarchive.wustl.edu
			      "a2fx it!"
			   ................