File Transfer Protocol (FTP) has been used since the early 1970's as the standard method for transferring files of any type from one computer to another on the Internet. Although sophisticated GUI-based FTP clients such as [FileZilla] (with versions for Linux, Mac, Windows, or [Portable/USB]) have been developed that allow fast and easy drag-and-drop file transfer between Internet computers, it benefits all users to learn how to use a basic character-based FTP client. All modern operating systems provide (at least) a character-based FTP client. This program is often critical to the acquisition and installation of further important software, such as drivers and upgrades. Those who use more than one operating system are pleased to discover that character-based FTP clients are almost identical regardless of platform. For general information about FTP and a detailed list of the optional features offered by character-based FTP clients, review FTP - File Transfer Protocol page on this site.
The bulk of this web page is devoted to a demonstration of using a character-based FTP client to upload a file to the IRSC Student (Linux) Server used in some courses taught by the Computer Science Department. Readers who are interested in learning alternative procedures using the File Explorer utility in Windows® to perform FTP transfers should read one of the following web pages:
[Access FTP Sites Natively in Windows 7]
[Setting up Windows Vista for FTP]
[Setting up FTP via File Explorer in Windows XP]
This example demonstrates use of the character-based FTP client in Windows (any version), but it should work almost the same on any operating system that offers a character-based command prompt. Be aware however that many servers are controlled by operating systems that are case-sensitive, which is true of the IRSC Student (Linux) Server. So users must give careful attention to their use of case when typing commands. The information required to connect to an FTP Server is: the server's fully-qualified domain name or IP number, user's account name and password, and any special options that must be used to accomplish the connection. The information required to perform an FTP transfer (upload or download) is: the filename and path to the file to be read and and filename and path to the file to be written. It is also important to know if the file being transferred is a text file or not, as these are transferred differently from non-text files such as: pictures, music, and programs. The method of transfer is called the transfer "mode" (meaning "method of operation"). Text files are transferred using a mode named "ASCII mode". Non-text files are transferred using a mode named "Binary (or Image) mode". This example is based on the following specifications for a fictitious student named Andy Baker with student number of A12-34-5678 uploading a web page that he has saved on a USB memory stick to his public web folder on the student server.
student.irsc.eduA12345678 (case-sensitive)ab45678 (case-sensitive)practice.htmlF:\projects (a folder on a USB memory stick)public_html (a sub-folder of user A12345678's home folder)FTP
in the "Open:" textbox and clicked on the OK button.open student.irsc.edu and pressing the
Enter key. The server responded: Connected to student.irsc.eduA12345678 (with first letter capital).ab45678 (notice: lowercase letters).
He did not see the keystrokes echoed on the screen, so he typed carefully. He then saw the following messages:230 Login successful. ftp>
statConnected to student.irsc.edu. Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On Debugging: Off ; Hash mark printing: Off . ftp>
Type: ascii; in the status report (on first line), he would have changed the transfer mode to ASCII using the command: aschash onlcd which is short for "local current (or change) directory".
Windows reported his current working folder as
Local directory now C:\Users\Andy. ftp>
lcd F:\projects.
Windows reported his current working folder as
!dir. (The exclamation point can be used to pass character-based
commands that are known by the operating system to its command interpreter for execution.)
Windows listed the contents of his current working folder, in which he saw his file named practice.html
listed.dir (without !) command to display the directory contents on the server.
He saw any files or sub-directories (folders) stored there, including a folder named cd public_html.cd public_htmldir command to display the sub-directory's contents on the server.
He saw any files or sub-directories (folders) present in that folder.put practice.html200 PORT command successful. Consider using PASV. 150 Ok to send data. ## 226 Transfer complete. ftp: 4405 bytes sent in 0.01 Seconds 2205000.00 Kbytes/sec. ftp>
closequitAll that was left now was to test whether his web page file could be retreived and rendered by a web browswer. So Andy opened his browser and entered the following web address (corresponding to the location of his public web folder on the student server:
http://student.irsc.edu/~A12345678/practice.html
Notice the presence of the tilde (~) character in the URL above, indicating a path to Andy's public web folder (public_html) on the student server. This is a standard notation used on Linux systems that host web pages beneath the home folders of individual account holders. The path http://student.irsc.edu/~A12345678/ maps to the user Andy's public_html folder. All web content beneath that point can be reached using a URL that starts with the path http://student.irsc.edu/~A12345678/.