Washington State University Department of Pure and Applied Mathematics
Imagemap

File Transfer Protocol (FTP)


FTP can be used to exchange files between machines for which you have accounts, or between your account and other internet 'host' accounts. Some computers have anonymous accounts set up. These act as a common repository usually allowing public access. The login name is anonymous and the password (usually your userid) is not checked but is required.

For example, to log onto your local account and make a connection with the remote machine, type the following

ftp beta.math.wsu.edu

It is possible to start ftp from your own computer without connecting to another, simply by typing ftp. If you start ftp this way, then in order to connect to a remote machine you must type o address, where address is the machines Internet address. The 'o' stands for 'open connection'.

Once you are connected to the remote machine, to show a listing of its files and directories, type ls.

To change to a subdirectory on the remote machine use the cd command.

cd 'newdirectory'

To get a copy of a file located on a remote machine use the get command. For example, to transfer the file foo.bear from the remote machine to your home machine, where it will be called foo.bar, type

get foo.bear foo.bar

The default mode of file transfer is ascii. That means that if you try to transfer an executable code or a compressed file, it will not work. To get a copy of a binary or executable file located on the remote machine, binary mode must be used. The following pair of commands, typed in sequence, will transfer the binary file foo.bin to your home machine using the same name.

binary

get foo.bin

You may also get several files at once, but to do so you must give up the option of renaming them on your home machine. The mget command allows you to get several files at once.

In order to transfer files from your home machine to the remote machine, you use the put command. Put has a similar syntax to that of get: type put 'local file' 'remote file'. You may omit the name of the remote file if you do not need to rename the file. For example, the following command places the file foo.bear on the remote machine under the same name.

put foo.bear

There is an mput command with similar syntax to mget.

To obtain further information, use help and or refer to manuals.Used with no argument, help gives a list of valid commands. If used with an argument, it gives a description of the command.

Terminate your ftp session with the quit command.


Math Home / People / Computer Services / Departmental News / Prospective Students / Current Students / Research

Webmaster Math Home Page


This page last modified on 8/10/00
Copyright © 2000 Washington State University
Please view the Disclaimer