12.4 The World Wide Web and File Transfer Protocol...


File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host or to another host over a TCP-based network, such as the Internet. FTP is designed mainly for use by programs. The objectives of FTP are (Postel, Reynolds and ISI 1985):

to promote sharing of files (computer programs and/or data),
to encourage indirect or implicit (via programs) use of remote computers,
to shield a user from variations in file storage systems among hosts, and
to transfer data reliably and efficiently.

The FTP client initiates the first connection, referred to as the control connection; to well-known port 21 (the client's port is typically ephemeral). It is on this port that an FTP server listens for and accepts new connections. The control connection is used for all of the control commands a client user uses to log on to the server, manipulate files, and terminate a session. This is also the connection across which the FTP server will send messages to the client in response to these control commands (Parziale, et al. 2006).

12.4 The World Wide Web and File Transfer Protocol...


FTP Linux Command

ftp is the user interface to the Internet standard File Transfer Protocol. The program allows a user to transfer files to and from a remote network site. Options may be specified at the command line, or to the command interpreter.

Examples:
ftp abc.xyz.edu : This command will attempt to connect to the ftp server at abc.xyz.edu. If it succeeds, it will ask you to log in using a username and password. Once you are logged in you can get a list of the available ftp commands using the help function:

ftp> help
ftp> ls : This command prints the names of the files and subdirectories in the current directory on the remote computer.

ftp> get image1.jpg : Downloads the file image1.jpg from the remote computer to the local computer. Warning: If there already is file with the same name it will be overwritten.