Checksum: 2981645349 (Verify with "brik -cv") X-Submissions-to: ibmbin@crdgw1.crd.ge.com X-Questions-to: ibmbin-request@crdgw1.crd.ge.com Posting-number: Volume 16, Issue inf09 Originally-from: oneill@bass.bu.edu Submitted-by: oneill@ulowell.edu Organization: UMass at Lowell Archive-name: admin/ftpman1.4a [Date of Last Change: 05/03/91 Release 1.5] GETTING BINARIES VIA FTP Copyright (c) 1991 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 ', where 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 (192.88.110.20, 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 '192.88.110.20' 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:'. For MS-DOS programs, the main directory is 'PD1:'. 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:' (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:. So, you can enter 'cd pd1:'. 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'.