The FTP program enables people to move files easily across the Internet. This document outlines how to do this on the Kenyon VAX computers. Other Internet tools, such as Netscape, described elsewhere in this workbook, provide an easy-to-use interface for FTP as well.
FTP is a program designed to move files (especially large ones) from one place to another via the Internet. One can down- or up- load a file using various FTP commands.
This utility is perhaps the most difficult use of the Internet to understand. In addition to an address to or from which you wish to transfer files, a detailed understanding of the network, the operating system at the foreign site, and a number of FTP commands, you will almost always need the proper username and passwords.
To Start FTP
The simplest way to connect to a foreign host to transfer files is to type FTP at the $ prompt and specify a host:
$ FTP host.domain R
A connection will be made and you will be asked for your username. After you provide it, you may be asked for a password.
FTP can also be started without a hostname; at the $ prompt type:
$ FTP R
Once inside the utility, you can connect to a foreign host by providing the appropriate IP address or host name after the OPEN command, like this at the FTP> prompt:
FTP> OPEN nnn.nn.nn.n R
FTP> OPEN host.domain R
For instance, if you want to FTP to Kenyon's academic VAX (usually a pointless but possible proposition) you could type at the FTP prompt:
FTP> OPEN 220.127.116.11 R
FTP> OPEN KCVAX1.KENYON.EDU R
Should you fail to properly provide your username or password, you may try again by using the USER and PASS commands. For instance, after supplying an incorrect password you might see:
The connection is still open, as reflected by the new prompt,
At this prompt, to supply a different username, type:
KCVAX1.KENYON.EDU> USER R
If you have only typed your password incorrectly, you may use the PASS command.
When dealing with different computers, you may run into another operating system (a way of organizing information and commands). Knowing the directory structure of a new (or familiar) operating system is important for finding what you need.
Some Internet hosts will not require you to have an account but will instead ask you to specify the name of the service you wish to access, so that you might log in as "anonymous". When you log in with a username of anonymous, it is customary to type your internet address when asked for a password.
To Change Subdirectories
To change what directory you are accessing, use the change directory command, as below for a VMS system like Kenyon's, at the KCVAX1.KENYON.EDU> prompt:
KCVAX1.KENYON.EDU> CD [directory.subdir] R
or as follows for a UNIX system:
CD /directory/subdir R
Beware of Playing Around
Experimenting with these functions is a rather tedious process, and should not be done. Other systems may decide that you are a threat to security there and disconnect you.
To Download A File
Once you have located the file you wish to download, use the GET command:
GET filename.txt R
Various messages appear during the transfer process, and these can be understood (if you are interested) with a little effort.
To Upload A File
If, on the other hand, you wish to upload a file to the foreign host, make sure that you are in the proper directory, and type:
PUT filename.txt R
File Types: ASCII or Binary
The FTP program can transfer files in either binary or ASCII mode. If you are about to transfer a file labeled .TXT or one you know is in an ASCII format, type at the host.domain> prompt:
Other files will be of a binary type. For these, type:
Please be sure that you know what you are transferring and that it is of a reasonable size. Transferring large files is often time-consuming and you should be careful not to use more space than you have been allotted on the Kenyon computers.
To Close a FTP Connection
When you are ready to close a connection to a foreign host, at the FTP prompt, type:
You can now OPEN another connection.
To Stop Using FTP
When you are done with your FTP session, to leave the program type:
The EXIT command will CLOSE any open connections before exiting FTP.
The following commands are recognized by most, if not all, ftp clients and servers.
Sets file transfer to ASCII mode for transferring only ASCII text files.
Sets file transfer to BINARY mode for transferring binary files. Examples of binary files would be programs, graphics, WordPerfect documents, etc.
Change working directory on the remote system to the named directory.
CD /PUB/MSDOS RChanges working directory to /PUB/MSDOS
Ends FTP session and returns to FTP command mode. You can OPEN another connection or QUIT.
Deletes the named file on the remote system.
DELETE OLDFILE.TXT R R
Displays directory listing of files in current working directory on remote system.
HELP command (or ?)
Displays brief information about the named command.
HELP DIR R
Type ? alone will display a list of all available FTP commands but without any instructions on use.
Changes the default working directory on the LOCAL system.
LCD C:\FILES RChanges working directory to C:\FILES on local computer system.
Equivalent to the DIR command but displays a short listing.
LS /PUB/MSDOS R
Gets multiple files from remote system to local system. The list of files can be filenames each separated by a space or specified by using wildcard characters. The wildcard character, an asterisk (*), means any file and a question mark (?) means any character at this position.
MGET *.* RGets all files.
MGET *.TXT R Gets all files with extension TXT
Puts multiple files onto remote system from local system. The list of files can be filenames each separated by a space or specified using wildcard characters (see MGET).
Connects to named remote system.
A system's hostname.domain format is similar to
A system's IP address is similar to
OPEN KCVAX3.KENYON.EDU R
OPEN 18.104.22.168 R
Prints the current working directory on the remote system.
Closes any remaining FTP connections and exits FTP.
Causes remote system to prompt for username and password. This is helpful if you enter an incorrect username or password and need the FTP server to prompt you again for your username and password.
Begin by making sure you are logged into your Kenyon VAX account.
At the $ prompt type FTP R . This will start the FTP client program. Your account on the VAX is considered the LOCAL system.
GOAL:FTP to WIRETAP.SPIES.COM and GET JAPAN.CON (Japanese Constitution)
Type: FTP WIRETAP.SPIES.COM R
Type: anonymous R
Type: your-email-address R
Type: CD Gov/World R
Type: ASCII R
Type: GET JAPAN.CON R
Type: CLOSE R
Type: QUIT R
Type: MORE JAPAN.CON R