spacer

Using Command Line FTP

FTP is used to upload or download files from servers. The basic command line ftp is a Unix command that also has been copied into Windows.

Unix, Linux or Mac OSX users can open a Unix window and use FTP.

Windows

You run command line FTP from a DOS Window. A DOS Window (command prompt) can by started by typing "cmd" in the search area next to the Windows start button.

Mac

You can run command line FTP from the Terminal program, which is found in /applications/utilities on your hard disk.

Starting FTP

Once you are in front of a comand/system prompt, type:

 ftp server-name  

Where server-name is the name of the server you want to connect to, for example:

 ftp www.brandx.net

This will start the program. Next you will be prompted for your username and password. If they are accepted you will be connected to a site where you can list and upload or download files.

Sample FTP Session

Jims-MacBook-4:temp deborahroetman$ ftp www.brandx.net 
Connected to www.brandx.net. 
220 Welcome to the Brand X Internet AWS web server. 
Name (www.brandx.net:deborahroetman): pilots 
331 Please specify the password. 
Password:  ******
230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. 
ftp> ls 
229 Entering Extended Passive Mode (|||65533|). 
150 Here comes the directory listing. 
-rw-r--r--    1 507      48            120 Nov 08 02:56 index.html 
226 Directory send OK. 
ftp> get index.html 
local: index.html remote: index.html 
229 Entering Extended Passive Mode (|||65534|). 
150 Opening BINARY mode data connection for index.html (120 bytes). 
100% |***************************************************************|   
120       20.82 KiB/s    00:00 ETA 226 Transfer complete. 
120 bytes received in 00:00 (1.96 KiB/s) 
ftp> put index.html 
local: index.html remote: index.html 229 Entering Extended Passive Mode (|||65534|). 
150 Ok to send data. 100% |***************************************************************|   
120      915.52 KiB/s    00:00 ETA 226 Transfer complete. 
120 bytes sent in 00:00 (1.04 KiB/s) 
ftp> quit 
221 Goodbye. Jims-MacBook-4:temp deborahroetman$  

FTP Commands

Here is a list of the commands you will routinely use in the FTP program:
put filename - Upload a file to the server
get filename - Download a file from the server
mput filename - Put multiple files on the server
mget filename - Get multiple files on the server
ls - Get a list of files in the current directory
cd - Change directory
quit - Ends your ftp session