[comp.windows.ms] Remedial FTP

rlw@.ida.org (Richard Wexelblat) (02/28/91)

Would some kind soul please post a detailed pseudo-man-page on how to
use FTP from cica to obtain executable and other interesting things?

This would include, for example, how to connect, how to find out what's
there, how to download, and how to terminate the connection.

Once on your system, how do you unpack or unzip (and where can the
unpack or unzip executables be obtained)?

Question:  how "safe" are the cica modules?  Is anyone checking them for
viruses or worms or is it just "caveat executor"?	

Thanks.

-- 
--Dick Wexelblat  (rlw@ida.org) 703 845 6601
  Can you accept an out of state sanity check?

gordon@osiris.cso.uiuc.edu (John Gordon) (03/01/91)

>Would some kind soul please post a detailed pseudo-man-page on how to
>use FTP from cica to obtain executable and other interesting things?

>This would include, for example, how to connect, how to find out what's
>there, how to download, and how to terminate the connection.

>Once on your system, how do you unpack or unzip (and where can the
>unpack or unzip executables be obtained)?

>Question:  how "safe" are the cica modules?  Is anyone checking them for
>viruses or worms or is it just "caveat executor"?	

	HOW TO FTP:

	1) log on to your Unix system.  (You *did* say detailed...:-) )

	2) type "ftp <host-name>", where <host-name> is the name of the
host machine that you are trying to get to.
Example: "ftp cica.cica.indiana.edu".  Note: In some cases you may not be
able to use the name, you will have to use the IP address number.  This
number is 4 numbers separated by dots, i.e. "135.56.9.2".  If you have to
do it this way, you would type "ftp 135.56.9.2".  Presumbly you can 
obtain the IP number from the same place you got the host-name.

	3) When you connect to the host, you will have to enter a login
and probably a password.  Mot sites support what is called "Anonymous FTP",
this means that you enter "anonymous" as your login and then enter your
real login as you password, i.e. "joe@comp.node.whatever".  I have heard
that sysadmins rarely check this, but it is curteous to give your real
login.  NOTE: Most sites don't want you using anon. FTP during prime-time,
which is usually 7am-6pm *local* time.  Do it at night.

	4) After you have successfully logged on, you can use "cd" and
"ls", among other commands, to get where you want in the directory tree.

	5) Once you are in the correct directory and know what files
you want, you can use "get" to copy single files, i.e. "get file1.c", 
or "mget" to get multiple files, i.e. "mget *.zip".  NOTE: If the
files you are copying are not plain-text files, i.e. compressed files,
binary data files, etc. you will want to set the transfer mode to 
"binary".  You can do this by typing "type binary".  "tenex" also
works in some places.

	6) If you get stuck, you can type "help" or ? and get a list
of FTP commands that you can use.  "man ftp" from your system prompt
will also be helpful.

	7) If any of the files you copied have a .Z, .shar, and/or
.tar extensions, you will have to play around with the files a bit
before you can use them.  Check out the man pages for the commands
"uncompress" (for .Z files), "shar" (for .shar files), and "tar"
(for .tar files).

	8) Software obtained this way will probably not have viruses,
but you never know.  Be careful out there.  Note: I say that "it will
probably not have viruses" because there is simply more "clean"
software out there than there is "dirty" software, not because FTP
is somehow inherently safer.



---
John Gordon
Internet: gordon@osiris.cso.uiuc.edu        #include <disclaimer.h>
          gordon@cerl.cecer.army.mil       #include <clever_saying.h>

oneill@hal.ulowell.edu (Brian 'Doc' O'Neill) (03/07/91)

Here is something I wrote a while back, and somewhat kept up-to-date. It was
originally designed for the folks over at comp.binaries.ibm.pc...the
information is transportable to other systems...

[Date of Last Change: 08/04/90 Release 1.4]

			GETTING BINARIES VIA FTP

Copyright (c) 1990 by Brian O'Neill. Permission to copy this file feely is
given, so long as the file remains unmodified.

    FTP stands for File Transfer Protocol.  It allows a person to transfer
files between two systems, generally connect over local area networks or
wide area networks, such as the Internet.

    If your hosts system has FTP and is connected to the Internet, you
can access very large amounts of archives available on a number of
systems, such as Simtel20 or uunet.uu.net.  This is a simplified use
manual, and will use two examples, one a TOPS-20 system
(wsmr-simtel20.army.mil, which has a large base if PD/Shareware MSDOS
software), and one Unix system (uunet.uu.net, where archives of the
comp.sources newsgroups are kept).

    The simplest way to initiate FTP would be to give the command 'ftp
<system-name>', where <system-name> is the remote system you are
connecting to, either a name (wsmr-simtel20.army.mil, if you have an
entry in /etc/hosts or are accessing a Domain Name Server, such as bind) or
the InterNet address (26.2.0.74, for Simtel20).  After a short wait, you
will be prompted for your username.  If you do not have an account on the
remote system, some systems allow you to use 'anonymous'.  This gives you a
restricted access path, allowing you to access certain files only.

    You would then be prompted for a password. If you are using your own
account, give your password. If you are using 'anonymous', the system may
ask you to send your real identity as the password.  What you type doesn't
matter, but it is suggested to give your mail address.  Other systems
need a password of 'guest', or something similar.

    After that, you should receive the FTP prompt (usually ftp>), and
now have access.  You can get a directory of files be giving a 'dir'
command, or if the remote system is Unix-based, 'ls -l' will give the
familiar output.  On Simtel20, there is a file available in the
default anonymous ftp directory that explains what Simtel20 is, and
where files are located.  The name is 'SIMTEL-ARCHIVES.INFO.nn, where
".nn" is a file generation number.  You don't need to specify the file
generation number when requesting the file.  In fact, it's better not
to because you will always get the latest generation that way.

    Unix systems will all have the familiar directory structure, and
moving around is done with the familiar 'cd' or 'cwd' command.
TOPS-20 systems have a different structure, but movement is still
accomplished with the 'cd' command.

    I will use Simtel20 as the first example. To start, give the
command 'ftp wsmr-simtel20.army.mil' from your shell prompt, or 'open
wsmr-simtel20.army,mil' from the 'ftp>' prompt.  If this host is not
in your /etc/hosts file or you do not have access to a Domain-name Server,
use '26.2.0.74' in it's place.  After a few seconds, you'll be prompted 
for your username.  Type 'anonymous', and when prompted for password, 
give your e-mail address (more as a courtesy than anything else), or if 
you prefer, 'guest'.  You should then shortly get back the 'ftp>' prompt.  
If you receive an error message stating that there are too many anonymous 
logins, wait a few minutes and try again. Simtel20 has limited access,
especially during normal business hours.

    Now, say you want to see what is stored for MS-DOS programs.
Simtel20 is a DEC System-20 running the TOPS-20 operating system.  The
directory structure is 'DISK:<DIRECTORY.SUBDIRECTORY>'.  For MS-DOS
programs, the main directory is 'PD1:<MSDOS>'.  In here there is a
file called 'MSDOS.CRCLST', which is updated almost daily.  It
contains a list of all files within the MS-DOS subdirectories, along
with file size and CRC value.

    To get this list, first switch to that directory by saying 'cd
pd1:<msdos>' (TOPS-20 is not case sensitive).  If you are prompted for
another password just ignore the request.  When you get the 'ftp>'
prompt back, you can then say 'get msdos.crclst'.  This will initiate
the transfer, and after a few minutes it will be completed.  The
beauty of Unix is that while you are transfering something big, you
can put it in the background and do something else.

    Say you wanted to get ProComm Plus TD. According to the list, it is
in PD1:<MSDOS.PROCOMM>.  So, you can enter 'cd pd1:<msdos.procomm>'.
A 'dir' will show all the files in that directory.  (You may wish not
to use too many 'dir' commands, as they are sometimes fairly slow).

    Now, you want the file 'pcplustd.arc'.  First, you must tell your
host what kind of file it is.  On most Unix systems, 'binary' or 'set
type binary' or 'set type I' will work.  However, as Simtel20 runs a
different OS that has different word sizes (36 bits) you must specify
'tenex' or 'type L 8' to transfer properly.  You can then issue a 'get
pcplustd.arc' command, and after a short while, you have ProComm Plus TD.
To end your session, enter the 'bye' command.

    Unix is a little more familiar for most people with Internet access. 
For example, you might wish to get sources to the latest version of ZOO
from uunet.uu.net.  First, you give the 'ftp uunet.uu.net' command (or 
ftp 192.48.96.2), giving 'anonymous' for the username, and your address 
as the password.  You can then use the 'dir' or 'ls -l' commands to scan 
the directories.  After some directory searching, you find it is located in
comp.sources.unix/volume17/zoo2, showing that it was posted in
comp.sources.unix, volume 17. Inside that directory, you find 10 parts,
labelled part01.Z to part10.Z. As told by the .Z suffix, these files are
compressed binary files. You must tell FTP to operate in binary mode, so
type 'binary' or 'type I' to set it. You can then do a 'get' for each file.
Now you have the original sources to Zoo 2.01.

    Different systems have different organizations for their files, and the
above example is just the way I have it set up.  By 'poking' around other
systems, you can learn how their files are set up, and zip around much
faster.  Note, however, that FTP will not allow you outside the FTP 'root'
directory, usually ~ftp on most systems.  So, poking about the entire system
is not permitted.

    You now have a basic understanding of how to use FTP to get the things
you want. I hope this has been of use. Questions and comments welcome.  
Other features of FTP can be found in the manual - please check there. My
E-mail address is oneill@hawk.ulowell.edu.

    Messages regarding problems, complaints or suggestions for
Simtel20 should be addressed to 'action@wsmr-simtel20.army.mil'.

-- 
=======================================================================
Brian O'Neill - Systems Manager, Computer Science, University of Lowell
Internet: oneill@ulowell.edu				 (508) 934-3645 
UUCP: harvard!ulowell!oneill