Subject: How to ftp LAD-Q&A

From: [email-masked] (Yonghong Li)
Date: Thu, 19 Aug 93 10:11:11 -0400

Hi, netters,
	I received many letters about using ftp. Here is a help file from CND.
You can go to the end of the file and read "Question (6)", which is a step-by-setp help on "ftp LAD-Q&A". 
	To use ftp, you need to have an access to internet.
-----------------------------------------------------------------------------

                              CND-CM Help File
			     How to FTP a File

Table of Contents: 
-------------------------------------------------------------------------
1. What is anonymous FTP ............................................  08
2. How to get files from anonymous FTP ..............................  60
3. Some common formats in anonymous FTP .............................  51
4. Some frequently asked questions ..................................  54
-------------------------------------------------------------------------

-------------------------------------------------------------------------
1. What is anonymous FTP? 
-------------------------------------------------------------------------

FTP stands for File Transfer Protocol.  It  is a subsystem to allow user to
transfer file between two  remote  systems.    On  internet, there are many
public file servers that archive  data  files and free/shareware of various
kinds. People can login these accounts as 'anonymous' (anonymous must be in
lower case for those servers on  unix system) and retrieve files from these
'anonymous' accounts. 

-------------------------------------------------------------------------
2. How to use anonymous FTP
-------------------------------------------------------------------------

Users on internet systems (such  as  .edu,  .ca, gov, .se ,.ch,.fi etc) can
access anonymous  file  server  via  FTP.  Many  bitnet  nodes  are also on
internet at the same time. To  see  if you have internet access, type 'ftp'
or 'telnet' at system prompt, if you get a system message stating that your
command is wrong, then you  probably  don't  have ftp access, otherwise you
will be in ftp subsystem.

To login anonymous server on a  remote  machine, type in the following line
at your system prompt: 
ftp Host name
Example: To connect to anonymous ftp at ahkcus.org, type
ftp ahkcus.org  (or ftp 192.55.187.25)
After connecting to remote system, enter 
user anonymous 
On some systems, user are automatically prompted. In that case, just type 
anonymous
Then you will be prompted for  password.  You can enter your e-mail address
as password. 

A typical ftp session looks like this:

ftp ahkcus.org        (this command connect you to ahkcus.org)
user anonymous        (login anonymous account )
anything              (enter something as pw, your user id is preferred)
dir                   (list available directories and files)
cd gb/cnd-cm          (change directory to gb/cnd-cm subdir)
binary                (specify binary mode)
get cm9201a.gb        (retrieve file cm9201a.gb in binary mode)
quit                  (quit ftp session, return to your local system)

The first command  you  use  after  login  is  usually  'dir'. You use this
command to list available directories and files. Files in anonymous ftp are
organized in different directories. For example, all GB files in ahkcus.org
are  in  gb/  directory.   Under   gb/   directory,  there  are  some  more
subdirctories, one is gb/cnd-cm/ where  cnd-cm  past  issues in GB code are
archived. another is gb/poem/ where Chinese  poems  in GB are stored. cd ..
is the command that get you  up  one  level in the directory structure. For
example, if you are currently in  src/pc/  dirctory,  cd .. will let you go
back to src/. 

The command to retrieve files is 'get'  or 'mget'. For example, if you want
to get CMindx91.gb of cnd-cm. type the following in gb/cnd-cm directory:
bin
get CMindx91.gb
Note that file name should be typed in exactly the same way as it is listed
in the directory. Unix system is CASE SENSITIVE.

If the file is text(ASCII) file, you don't need to specify the transmission
mode(the default is ascii). But if the  files you are going to retrieve are
binary ones such as  .exe,  .gb,  .zip,  .tar.Z,  .gif,  you should issue a
command 'binary' before getting the file.  If  you  want to get a number of
files, you may use mget. Example:
mget byx*.exe  
This command will get  you  all  byx  files  in src/pc/BYX/ subdirectory at
ahkcus.org.

The last command in a ftp  session  is  'quit'. It will disconnect you from
remote machine.

-------------------------------------------------------------------------
3. Some common formats in public domain
-------------------------------------------------------------------------

To save diskspace and transfer  time,    most files in anonymous ftp server
are compressed in certain way. Here are some common compression format:

(1)ZIP format

This is the most common one for  PC.    You need  unzip utility to retrieve
files. The one we provided in  ahkcus.org is pkunzip.exe. pkunzip.exe is in
the self-extracting package pk110eu.exe.  For self-extracting packages, you
don't need any utilities to unarchive them.  Just type the file name at the
DOS prompt, files in  the  package  will be extracted automatically. BYX1.1
packages in ahkcus.org are self-extracting ones.

There are also  zip/unzip  utilities  for  unix  and  vms systems. They are
available in src/unix/ and  src/vms/  at  ahkcus.org.  You  can use them to
unzip files on your mainframe machines.

(2)Unix Compressed files:

Unix compressed file has an  extension  '.Z'. For example, cnd-g archive in
ahkcus.org  is  .Z  compressed.  Those   files    can  be  uncompressed  by
'uncompress' command on Unix. '.tar.Z'  is compressed unix tape archive. To
extract files from such an  archive  file, uncompress first, then untar the
'.tar' file. Example:
uncompress gb2ps.tar.Z
tar -xf gb2ps.tar

There are also unix compression  utilities  for vms system. compress.exe in
src/vms directory is one of them.  So you can uncompress  a unix .Z file on
a VMS system too. 

(3)Compression on Mac:

Mac files in  anonymous  ftp  often  have  .sit  or  sit.hqx extensions. To
uncompress/unarchive these files, use StuffIt and Binhex. Details are given
in MacHelp in src/Mac directory at ahkcus.org.

(4)Other formats:

The other compression formats  often  seen  in  anonymous servers are .lzh,
.arc, .zoo. 

HXWZ uses extension .gb to  indicate  GB  coded  Chinese.  If a file has an
extension BIG or BIG5, it is BIG5 coded Chinese. 

GIF stands for Graphic Interchange Format. xxxx.gif's are pictures.  

All these compressed files such  as  .zip,  .Z, .lzh, .sit are binary ones.
They should be transferred in  binary  mode.  .gif and .exe are also binary
files. .hqx, uue, and .txt are  text  files.  They  should be transfered in 
ascii mode. 

-------------------------------------------------------------------------
4. Frequently asked questions:
-------------------------------------------------------------------------

(1)I got a message 'xxx host unknown', what should I do?

A: A: Try IP(Internet Protocal) numbers. eg,
ftp 192.55.187.25

(2)I got a message 'network unreachable', what should I do?

A: Wait until  the  network  is  backup,  or  try  other anonymous ftp that
archive the same files you wanted.

(3)My system does not allow the  file  name  such as gb2ps.tar.Z. How can I
get files with this kind of names to my system?

On some system(eg, VMS), xxx.tar.Z  is  not a valid filename. When fetching
these .tar.Z file, change .tar.Z to .tar_z. For example:
get HXWZ45_1.tar.Z HXWZ45_1.tar_z
The remote file  HXWZ41_1.tar.Z  will  be  saved  as HXWZ45_1.tar_z on your
local disk.

(4)I just downloaded program xxx, but when  I run it, it simply hang my PC.
What's the problem? 

Most probably you forgot to use binary mode during either ftp or mainframe
to pc downloading. The file is corrupted.

(5)I got a message saying  "program  too large  for the memmory" When I run
program xxx on my PC?

Perhaps it's the same problem as in (4).

(4)Are there any other ftp servers that archive Chinese software?

Yes. There are quite a few. For example:
   blackbox.hacc.washington.edu [128.95.200.1]
   crl.nmsu.edu [128.123.1.1.4]
   cs.purdue.edu [128.10.2.1]
   ftphost.cac.washington.edu [128.95.112.1]
   hanauma.stanford.edu [36.51.0.16]

(5)Where can I get a list of  anonymous ftp sites? How can I search certain
program available on internet?

You can use Internet anonymous FTP database to get various useful info. To
access those "Archie" servers, login as archive  (by telnet or rlogin)

telnet archie.mcgill.ca or 132.206.2.3 (Can./USA)
telnet archie.funet.fi or 128.214.6.100 (Finland)
telnet archie.au or 128.184.1.4 (Aussie/NZ)
telnet archie.sura.net or 128.167.254.179

You can get help on how to use archive after login. If you know a program's
name, but don't know where it is available, archive can help you to locate
it on interenet.

(6)Where can I get the information packages on LAD network?

This is a step-by-step help. Anything in "   " is typed by yourself and the others
are response from the computer. Different computer may give you a different response.

%"ftp spike.rice.edu <return>"

Connected to spike.rice.edu.
220 spike FTP server (Version 6.25 Mon Aug 9 21:46:38 CDT 1993) ready. 
Name (spike.rice.edu:yhl): "anonymous <return>"

Password:"<return>"

230-Next time please use your e-mail address as your password
230-        for example: [email-masked]
230-Welcome! Network is fantastic, isn't it?
230-     For Univ. of Sci. & Tech. alumni address   ---> 852
230-     For Chinese novels and articles in GB      ---> Chinese
230-     For Late-Arrival-Dependent issues          ---> lads
230-This site may be shutdown without notice. Get what you want and keep them.
230-
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.

ftp>"ls -l"
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 8
drwxr-xr-x  2 snow     misc          512 Aug 11 18:15 852
drwxr-xr-x  6 snow     misc          512 Aug 10 10:32 Chinese
drwxr-xr-x  2 root     wheel         512 Apr 21 10:42 bin
dr-xr-xr-x  2 root     wheel         512 Apr 21 10:40 dev
drwxr-xr-x  2 root     wheel         512 Aug  9 23:00 etc
drwxr-xr-x  2 root     wheel         512 Aug  9 23:12 incoming
drwxr-xr-x  2 snow     misc          512 Aug 13 23:56 lads
drwxr-xr-x  4 root     wheel         512 Nov 18  1992 usr
226 Transfer complete.

ftp>"cd lads"
250-This is an archive for packages posted to LADnet by LADnet committee.
250-
250- 9308lads.log    =>  auto-appended when a committee member posts a package.
250- Question.Answer =>  updated daily by committee members.
250- Special.*       =>  contains important special report.
250- faq             =>  updated whenever there is a change.
250-
250 CWD command successful.

ftp>"ls -l"
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 485
-rw-r--r--  1 snow     misc          317 Aug 14 00:05 .message
-rw-rw-r--  1 snow     wheel      448765 Aug 18 14:43 9308lads.log
-rw-r--r--  1 snow     misc        26832 Aug 12 21:27 Question.Answer
-rw-r--r--  1 snow     misc         6652 Aug 13 23:55 Special.1
-rw-r--r--  1 snow     misc         1858 Aug 12 21:34 faq
226 Transfer complete.

ftp>"get Question.Answer"
local: Question.Answer remote: Question.Answer
200 PORT command successful.
150 Opening BINARY mode data connection for Question.Answer (26832 bytes).
226 Transfer complete.
26832 bytes received in 0.64 seconds (40.94 Kbytes/s)

ftp>"bye"
221 Goodbye.
%

------ now your are all done, use "more Question.Answer" to read the file -------------

---------------------<< End of Help File >>-------------------------------