Using the ftp Command



An Example Using ftp

Suppose that we wish to obtain some free software (or software updates) from Microsoft. Here is a transcript of a session using ftp.
	% ftp ftp.microsoft.com
	Connected to ftp.microsoft.com.
	220 ftp Windows NT FTP Server (Version 3.51).
	Name (ftp.microsoft.com:nigelh): anonymous
	331 Anonymous access allowed, send identity (e-mail name) as
		password.
	Password:
	230-This is ftp.microsoft.com.  Please see the index.txt file
		for more information
	230 Anonymous user logged in as anonymous.
	ftp> ls
	200 PORT command successful.
	150 Opening ASCII mode data connection for file list.
	bussys
	deskapps
	developr
	...	### several lines deleted
	support-phones.txt
	WhatHappened.txt
	226 Transfer complete.
	227 bytes received in 0.031 seconds (7.1 Kbytes/s)
	ftp>


Local Commands



Summary of ftp Commands

cd DDD
cd ..
cdup
change current directory on remote machine
lcd DDD change current directory on local machine
ls
ls -l
dir
list contents of current directory on remote machine
get fff
recv fff
get file fff from remote machine
put fff
send fff
transfer file fff from local machine to remote machine
(note: requires write permission on remote machine and
anonymous users do not usually have such permission.)
binary perform transfers in binary mode
ascii perform transfers in ASCII mode
mget ppp multiple get of files with names matching pattern ppp
mput ppp multiple put of files with names matching pattern ppp
close terminate the ftp connection, but do not quit the ftp
program; this command is normally followed by open
open xxx open a connection to machine xxx
!CCC execute command CCC on local machine
quit
bye
quit the ftp program

 




Previous Section Back to Index Next Section