Copyright 1992 by Urban A. LeJeune Anonymous File Transfer Protocol (FTP) Files may be transferred via Internet using anonymous file transfer protocol (FTP) from those institutions making files available using this method. The are called anonymous ftp because you do not need an account to transfer files from systems allowing this type of transfer. Additionally, you will always log on using "anonymous" as your identification. You password should be you full internet address, unless you are instructed otherwise. Let us assume that an archie search has produced the following listing of an archived file at Tohoku University in Japan. Host akiu.gw.tohoku.ac.jp (130.34.8.9) Last updated 00:18 10 Mar 1992 Location: /pub/mac FILE rw-r--r-- 405 Apr 4 1991 README.txt The host name is the internet location location of the file. Since many locations are not recognizable by the letter listings ftping using the numbers tends to be fail-safe, although more tedious. The last update entry describes when this institution was searched for archie inclusion, not the creation date of the file. The update is rarely over thirty days old. The location is the directory path for the specified file. The file line has information about the specific file. The first group of letters related to file specifics and are of no read concern, there is information about the file such as read-only and other system information. The next group of numbers is the actual file size in bytes followed by the date when it was added to the data base. The last item is the actual file name. It is important to note that most archive data bases are stored on computers using the Unix operating system. On these machines case counts. If you see mixed case you know you are looking at a UNIX configuration. To be on the safe side always request files using the case as shown. The following is the VAX sequence that fetched the file listed above using FTP. Remember that the "$" is the actual VAX prompt. The parts starting with "!!!" are my added comments. The FPT prompt at the illustrated installation is "*". Other prompts, including ftp>, may be encountered. Netiquette (net etiquette) requires that you include your full internet address when ask for the password unless specifically instructed otherwise. Some systems may instruct you to enter "guest", or something else, as a password. When issuing the get command include the full pathname. You may alternatively issue a series of change directory, cd, commands. The second parameter is the name you would like the file to have on your receiving directory. If the second parameter is omitted the file will be copied with the same name as the original file. $ ftp 130.34.8.9 !!! domain from archie listing vax003 Wollongong FTP User Process (Version 5.2-05) Trying 130.34.8.9 ... Connection Opened Using 8-bit bytes 220 akiu FTP server (Version 4.175 Thu Dec 26 01:07:23 JST 1991) ready. !!! The above line may differ on other machines Name (130.34.8.9:fac147): anonymous 331 Guest login ok, send your mail address (NOT your password) as password. Password:fac147@vax003.stockton.edu !!! password will not echo 230 Welcome to the FTP-server of Tohoku University *get pub/mac/README.txt readme.001 !! note syntax of to-from file names 200 PORT command successful. 150 Opening ASCII mode data connection for pub/mac/README.txt (405 bytes). 226 Transfer complete. Local: SYS$USER6:[FAC147]README.001; Remote: pub/mac/README.txt 423 bytes transfered in 2.57 seconds (0.16 Kbytes/second) *quit 221 Goodbye. !!! FTP connection closed and control returned to VAX !!! We're mow back at the Stockton VAX $ type readme.001/p !!! produce a listing of the file just transfered comm/ communication tools doc/ documents game/ games graphics/ graphic tools hypercard/ HyperCard stacks misc/ misc. prog/ programming tools sound/ sound tools sys607/ new system system/ system related tools, DA, INIT/cdev,... tex/ OzTeX, NTT-JTeX for Mac tools/ misc. tools unix/ unix related virus/ anti-virus tools *.hqx BinHex file *.sit StuffIt file ( **BINARY** ) *.txt plain text file $ When you are connected to a remote site you may issue any commands that are appropriate for the remote operating system. If the remote machine is operating under Unix, which is the typical case, you may issue a "ls" at the ftp prompt, although "dir" usually works as well. You may also change directories. If you are going to transfer more than one file, or you want to "snoop" around at the remote site it is easier if you change to the appropriate directory. In the above example instead of issuing the "*get pub/mac/README.txt readme.001" command you could have done a "cd pub" followed by a "cd mac", or simply a "cd /pub/mac" command. I find it less error prone to do on level at a time. As with most other Internet software, issuing a "?" or "help" will give you a list of available commands. You may see a file that you think you would like to transfer but you would like to see its contents before "getting" the file try the following, it will work on some machines but not on others. On a Unix machine try "ftp get | more". On a VAX machine try "ftp get tt:" or "ftp get sys$output" where is the name of the file you wish to examine. Files archived at ftp sites may be classified and text or binary. Text file are those that have logical lines with no embedded special characters. The file you are reading is an example of a text file. Text file frequently have and extension of "txt", although "doc" is also common. Binary files are those with no end-of-line characters embedded in the file. Executable or compressed files would be examples. Common extensions of binary files are "zip", "exe", "com", and "tar". Binary files must be transferred as such. When you enter ftp the default mode is text. To change the mode simply enter "binary" at the ftp prompt. If you are subsequently going to Kermit the binary file to your PC, enter "set file type binary" before doing a "send". This course has a dedicated ftp directory at Pilot. You ftp to Pilot from the Stockton prompt. Don't forget to login using "anonymous" not you normal Pilot ID. Change to directory /pub/Internet-course. Note the upper case I. The following is the log of an actual transfer starting from the Stockton prompt. Again, the parts starting with "!!!" are my added comments. The "*" if the ftp prompt. $ ftp pilot.njin.net vax003 Wollongong FTP User Process (Version 5.2-05) Trying 128.6.7.38 ... Connection Opened Using 8-bit bytes 220 pilot.njin.net FTP server (SunOS 4.1) ready. Name (pilot.njin.net:fac147): anonymous 331 Guest login ok, send internet address as password. Password: !!! enter you internet address here 230 Guest login ok, access restrictions apply. *ls -l !!! look for the directory structure 200 PORT command successful. 150 ASCII data connection for /bin/ls (134.210.1.6,1051) (0 bytes). total 3 -r--r--r-- 1 0 0 Jul 17 1991 .hushlogin -r--r--r-- 1 0 0 Jul 17 1991 .rhosts -rw-r--r-- 1 22 314 May 4 18:12 README dr-xr-xr-x 2 22 512 Apr 24 1990 bin dr-xr-sr-x 8 22 512 Jun 9 12:17 pub 226 ASCII Transfer complete. *cd pub !!! remember we want /pub/Internet-course 250 CWD command okay, requested file action completed. *ls 200 PORT command successful. 150 ASCII data connection for /bin/ls (134.210.1.6,1052) (0 bytes). AmigaDNet.zoo ISETL Internet-course TCF ftp-list ncsa.22c sVsendmail.tar.Z scratch 226 ASCII Transfer complete. *cd Internet-course 250 CWD command okay, requested file action completed. *ls !!! notice the difference in this listing without the -l switch 200 PORT command successful. 150 ASCII data connection for /bin/ls (134.210.1.6,1053) (0 bytes). distribution-list.txt emacs.txt free-speech.txt listserv-lookup.txt 226 ASCII Transfer complete. *get free-speech.txt 200 PORT command successful. 150 ASCII data connection for free-speech.txt (134.210.1.6,1054) (23723 bytes). 226 ASCII Transfer complete. Local: SYS$USER6:[FAC147]FREE-SPEECH.TXT; Remote: free-speech.txt 24229 bytes transfered in 3.15 seconds (7.51 Kbytes/second) *quit 221 Goodbye. !!! log out and go back to stockton $ To get the file to your PC you must transfer it using the Kermit protocol. You must have Kermit capability with your communications software to transfer files from the Stockton VAX, and Pilot to your PC. The following sequence is a log session of a transfer. $ ru public:kermit C-Kermit, 4D(061) 8 Sep 86, Vax/VMS Type ? for help !!! Note that the syntax of the send if from - to !!! If you are going to use the same file name on your PC you !!! only need to specify one file name C-Kermit>send free-speech.txt freetalk.txt !!! After you have entered the above command the cursur will !!! be blinking under the C in C-Kermit. You usually press !!! the Page Down key to display your communications program !!! protocols. Select Kermit. It will then usually ask you !!! to confirm the PC file name. You will receive progress !!! messages during the process. You may have to try more than !!! once to effectuate the transfer. When it is finished it will !!! return to the Kermit prompt. C-Kermit>quit $ Everything that has been described here applies to ASCII text files. There are minor adjustments to be made for binary files. Binary files typically have an extension of ZIP, EXE, COM, or Z. To ftp a binary file you must first issue the "binary" command from the "*" prompt, then "get" the file as above. Before transfering a binary file with Kermit enter "set file type binary" at the Kermit command prompt. To run Kermit while accessing Pilot enter "kermit" from the "%" prompt, or enter the transfer option from the file menu. Two last points. FTPing is a privilege, treat it as such. Try and do your transfers during non-peak times, especially week-ends or late evening hours. Don't forget the time differential. Western Europe is five hours ahead of us here on the east coast and Japan is about twelve hours ahead of us. Have fun there is some really great stuff out there to be transfered.