by Bill Van Pelt
I can remember the day I walked into the HAL-PC HQ for the first time. Harvey Hild and Harry Madiera were in the library and signed me up as a member. I sat down in front of one of the library computers, and WOW, I couldnt believe my eyes. All that soft ware there for the taking and using. I had no idea such a thing existed.
The same thing happened when I discovered Anonymous FTP (File Transfer Protocol) on the Internet. Hundreds of computers on the Internet are open to the public to get all kinds of software and files. The number of sites is huge, a recent listing is 800K i n zip format and the list is available by anonymous FTP (fancy that). HALNet (our Internet service system) offers FTP to its users and uses a menu system to make it easier for them to access this valuable resource. Lets take a short look at how to use t he HALNet system.
After you are logged into the HALNet Internet system, you are presented with a number of menu choices. For FTP you choose: 4) Internet Functions Menu
The next menu gives you a choice of two Gophers, Telnet, Lynx, and FTP. You choose: 3) FTP
and are presented with a prompt to enter a host name. Here you enter the Internet address of the FTP site you wish to visit. Hit Enter and the FTP client program connects to the remote FTP host computer. You will be prompted for your user name. In this c ase your name will be anonymous. If you had an account at the remote system you would use your system user name, but since youre not an account holder, you log in as anonymous. Next you are asked for your e-mail address as a password. This lets the re mote system know who is accessing the site. If I were doing the FTP session my password would be billv@hal-pc.org.
Well, now youre in the remote system and youll be at the FTP prompt. It will look like this: ftp>
All your commands to the host computer will be typed at this prompt. As long as you see this prompt you know that you are running the FTP client program and all the FTP commands are available to you. Here are a few of the commands you will need to move through the host computer:
cd directorynamechange to directoryname
cd .. move up one directory level
dir list directory contents
pwd show directory you are in
bin switch to binary transfer mode
hash print # during file transfer
get filenametransfer filename to HALNet computer
bye leave remote computer/quit FTP
Once you are logged in to the host, use the Dir command to list the directory contents. Most FTP hosts will be using the Unix directory structure and the directories will be indicated by this listing in the le ft hand column:
dwrxr-xr-x - the d indicates the entry is a subdirectory of the current directory.
A file will be indicated by this listing: -rwxr-xr-x
So you can see, if it starts with a d its a directory, if it starts with a - its a file of some kind.
Now when you first log in youll see a number of directories, but the one you will generally go to is the pub directory; this is where most systems place the files available to the public. The names of the directories and files will be listed in the right hand column. Case is very important, so if the name is capitalized, be sure to enter the name exactly as you see it. After a cd pub youll do a dir to list out the pub directory contents. There will be more subdirectories and files, and you wil l move through the system with cd directoryname and dirs until you find the file youve been wanting.
Now is the time to get that file, but first look at the file extension and determine if it is a text file or a binary file. Due to the protocols of FTP, you cant transfer binary files (programs or zip files for instance) in the ASCII mode. Most system s default to the ASCII mode so before you transfer a binary file give the command bin to change to binary mode file transfer. Another thing to set is hash mark printing. You dont have to set hash mark printing on, but while the file is being transfe rred to the HALNet system you will be getting no indication that things are working. For a short file this is no problem, but a file of 700K may take a little time and it could seem like there is a problem. Hash mark printing will print a # for every 8 192 bytes transferred, and lets you know how your transfer is progressing. Now with the command get filename your file transfer begins. The file will be transferred from the remote computer to your home directory on the HALNet Unix computer. Depending on the state of the connection between the two computers, and the size of the file, the transfer can be very quick. When the file transfer is completed, the remote computer returns you to the FTP prompt. If youre finished give the command bye, if not get some more files. Whatever you decide, the files you get will need to be transferred to your home PC from the HALNet Unix computer, and this is done from the Utility Menu with the transfer p rotocol of your choice. Of course there are a number of other commands and things to do in FTP, but basically thats it.
One problem you may have is when you enter the host name at the menu prompt and the remote computer refuses you a connection. This can happen if the remote site has its full number of users logged in. You will be left at the FTP prompt, but not connected to a FTP site! In this case enter open hostname at the prompt. This will connect you to another host, or you could enter bye and start over from the FTP menu.
What about file types? How do you know what is text and what is binary? One way out of this problem is to always transfer in binary mode. Text will transfer just fine in binary mode, its the binary files that will not properly transfer in ASCII mode. So me sites will only transfer in binary, but you cant count on that, so be careful. Once you transfer a 500K binary file by ASCII mode and find it unusable, youll be more careful the next time. Dont worry, its a mistake everyone makes at one time or an other.
Notice the file named README? You will find these files all over in your travels through FTP. They are there to let you know what the directory contents are, or other information the system operators feel may help you. To read these files you can get t hem and log off, read them, and log back on; or better yet, use the command string get README - and they will be displayed to the screen.
The - after the file name tells the FTP client program to print to the standard output. Thats Unix talk for the computer screen. If the file is a long one it will scroll away, but you can use the scrollback buffer of your communications program to page back and read.
For the complete word on FTP, you should read the man page. This is the Unix manual page and is available to you in the Utility Menu section on the HAL-PC Internet system. There are also FAQ (Frequently Asked Questions) files available that answer the most common questions Internet users have. They are also there in the Utility Menu area.
One other item ... the FTP site list I mentioned at the start of the article is available at the site:
garbo.uwasa.fi. The directory path is: /pc/doc-net/FTP-list.zip
Have fun!!
Bill Van Pelt is a HAL-PC member, Internet SIG Leader and a member of the User Support Team at HALNet Internet. He can be contacted at billv@hal-pc.org.
E-mail me at webmaster@hal-pc.org with any comments you have and tell me what you want to see here.