Go to the previous, next section.

FTP

File transfer protocol (FTP) is a standard used for transferring files to and from machines connected to the Internet. Ftp can be used from all machines in the Computer Science Department. The easiest way to use the ftp program is to use ftp command followed by the name of the machine with which to connect:

ftp hostname

After executing this command, you will be prompted for a name and a password. Your response will depend on whether or not this is an anonymous ftp. An anonymous ftp allows anyone to login with a name of anonymous and access publically accessible files. When using anonymous ftp, the password prompt should be answered with the full E-Mail address of the user. An example of an anonymous ftp login would be:

rigel ftp wuarchive.wustl.edu 
Name (wuarchive.wustl.edu:moeh):anonymous 
Passwd (wuarchive.wustl.edu:anonymous):moeh@rigel.cs.pdx.edu 
331 Guest login ok, sent ident as password. 
331 Guest login ok, access restrictions apply. 
ftp>

If you are not using an anonymous ftp, then you would normally be logging into your own account on another machine. In this case, the name prompt would be answered with your login name, and the password prompt would be answered with your password on the remote machine. An example of a normal ftp login would be:

(rigel) moeh {519}> ftp cs.pdx.edu
Connected to cs.pdx.edu.
220 cs.pdx.edu FTP server (Version 5.89 Wed Jul 31 13:15:11 PDT 1991) ready.
Name (cs.pdx.edu:moeh): moeh
331 Password required for moeh.
Password: <moeh's password>
230 User moeh logged in.
ftp> 

Both anonymous and normal ftp should now display the ftp> prompt. You can always get help from the ftp> prompt by typing a ? or help. This will display a list of possible commands. The two most used commands are get which will retrieve a file, and put which will send a file. If the file is not a text file, then binary mode must be used. An example of retrieving a binary file with a file name of file1.c would be:

ftp> bin
200 Type set to I.
ftp> get file1.c 
200 PORT command successful.
150 Opening BINARY mode data connection for meetinfo03.Z (864 bytes).
226 Transfer complete.
local: file1.c remote: file1.c 
864 bytes received in 0.0018 seconds (4.8e+02 Kbytes/s)
ftp> 

The following is a list of some useful ftp commands and a brief description.

binary
set file type to binary
cd
change directory on remote machine
get
retrieve a file from the remote machine
hash
put a hash mark (#) after each buffer transferred
put
send a file to the remote machine
quit
quit ftp
ascii
set file type to ascii (text)

Go to the previous, next section.