FTP
at HALNet

by Bill Van Pelt


Transferring Files on the Internet

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 couldn't believe my eyes. All that software 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 in 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 t make it easier for them to access this valuable resource. Let's take a short look at how to use the 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 you user name. In this case your name will be "anonymous". If you had an account at the remote system you would use your system user name, but since you're not an account holder, you login as anonymous. Next you are asked for your email address as a password. This lets the remote system know who is accessing the site. If I were doing the FTP session my password would be billv@hal-pc.org.

Well now you're in the remote system and you'll 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 directory namechange to directoryname
cd ..move up one directory level
dir list directory contents
pwd show directory you are in
binswitch to binary transfer mode
hashprint # 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 left 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" it's a directory, if it starts with a "-" it's a file of some kind.

Now when you first login you'll 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 if very important, so if the name is capitalized, be sure to enter the name exactly as you see it. After a "cd pub" you'll do a "dir" list out the pub directory contents. There will be more subdirectories and files, and you will move through the system with "cd directoryname" and "dir"s until you find the file you've 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 can't transfer binary files (programs or zip files for instance) in the ASCII mode. Most systems 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 don't have to set hash mark printing on, but while the file is being transferred 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 8192 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 this 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 you're 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 protocol of your choice. Of course there are a number of other commands and things to do in FTP, but basically that's 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, it's the binary files that will not properly transfer in ASCII mode. Some sites will only transfer in binary, but you can't count on that, so be careful. Once you transfer a 500K binary file by ASCII mode and find it unusable, you'll be more careful the next time. Don't worry it's a mistake everyone makes at one time or another.

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" them and log off, read them, and log back on; or better 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". That's 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 Question) 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, leader of the Internet SIG and a member of the User Support Team at HALNet Internet.


E-mail me at webmaster@hal-pc.org with any comments you have and tell me what you want to see here.

Back to the User Journal Home Page