![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
| Online Resources Internet Technology HTML Web Design Business/Web Admin Perl/CGI/DHTML |
How to use File Transfer
Protocol: An Introduction
Introduction Another common use of FTP is to access resources that someone has made available on the Internet through an anonymous FTP site. This is a means of allowing anyone on the Net to login with an FTP session and send or receive files from the anonoymous FTP server. This is a way of making files accessible to the world. FTP is a line-mode (i.e. text based) type of Internet tool. The commands are pretty simple and there aren't very many of them, but there are no menus to fall back on! On a UNIX or Linux server (like itwebmaster.iit.edu) FTP is started by typing ftp which starts the FTP program (makes sense to me....) and the name of the site you wish to FTP to. and when the Run dialog box appears, type itwebmaster.iit.edu or wherever it is you want to FTP to.
If it is somewhere that you have an account (like itwebmaster), you login with your own username and password. If it is an anonymous FTP site, you must log on as "anonymous" (and you must spell it right, also), and give your full email address (i.e. username@itwebmaster.iit.edu) as your password. This is proper Netiquitte as it does get logged by the system you have FTP'ed to; they like to know who is using their FTP site. Let's retrieve a file by anonymous FTP
itwebmaster> ftp ftp.microsoft.com
ftp> 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. dr-xr-xr-x 1 owner group 0 Oct 7 1994 bussys dr-xr-xr-x 1 owner group 0 Oct 7 1994 deskapps dr-xr-xr-x 1 owner group 0 Dec 21 1994 developr -r-xr-xr-x 1 owner group 7657 Mar 2 9:47 dirmap.htm -r-xr-xr-x 1 owner group 4376 Mar 2 9:39 dirmap.txt -r-xr-xr-x 1 owner group 712 Aug 25 1994 disclaimer.txt -r-xr-xr-x 1 owner group 860 Oct 5 1994 index.txt dr-xr-xr-x 1 owner group 0 Mar 23 16:21 KBHelp -r-xr-xr-x 1 owner group 5711384 Mar 23 3:54 ls-lR.txt -r-xr-xr-x 1 owner group 711612 Mar 23 17:10 ls-lr.Z -r-xr-xr-x 1 owner group 554946 Mar 23 3:55 LS-LR.ZIP -r-xr-xr-x 1 owner group 28160 Nov 28 1994 MSNBRO.DOC -r-xr-xr-x 1 owner group 22641 Feb 8 1994 MSNBRO.TXT dr-xr-xr-x 1 owner group 0 Oct 7 1994 peropsys dr-xr-xr-x 1 owner group 0 Nov 2 1994 Services\ dr-xr-xr-x 1 owner group 0 Mar 10 9:46 Softlib -r-xr-xr-x 1 owner group 5095 Oct 20 1993 support-phones.txt -r-xr-xr-x 1 owner group 802 Aug 25 1994 WhatHappened.txt 226 Transfer complete. 1271 bytes received in 0.75 seconds (1.7 Kbytes/s) ftp>
ftp> get dirmap.txt 200 PORT command successful. 150 Opening ASCII mode data connection for fs500a.txt. 226 Transfer complete. local: dirmap.txt remote: dirmap.txt 886 bytes received in 0.31 seconds (2.8 Kbytes/s) ftp> To see the file we have retrieved, exit from FTP by typing quit Sending files... If I wanted to send a file named bogus.txt, I would simply type either send or put and the file name.
All of the FTP commands you will ever need: Frequently Used FTP Command List ? print local help information ascii set ASCII transfer type binary set binary transfer type bye terminate ftp session and exit cd change remote working directory cdup change remote working directory to parent directory close terminate ftp session delete delete remote file dir list contents of remote directory disconnect terminate ftp session get receive file lcd change local working directory (use lcd a:\ with Windows FTP to use the floppy as your local directory) ls nlist contents of remote directory mdelete delete multiple files mdir list contents of multiple remote directories mget get multiple files mkdir make directory on the remote machine mput send multiple files open connect to remote tftp prompt force interactive prompting on multiple commands put send one file pwd print working directory on remote machine quit terminate ftp session and exit recv receive file remotehelp get help from remote server rename rename file rmdir remove directory on the remote machine send send one file status show current status user send new user information There is command line help available from FTP by typing help and the command you want help on (but you'll just see what's listed above) You can FTP using World Wide Web browsers; it is frequently much easier because it will display the contents of text or graphics files and download binary (program) files. With a browser you can only download unless you are using Microsoft Internet Explorer (Windows) or Konqueror (Linux). You can also use a graphical FTP client such as SmartFTP (Windows) or Cyberduck (Mac) for file transfers. For a full list of Mac GUI FTP clients, see http://www.macorchard.com/ftp.html (...still looking for as nice a list for Windows). Secure FTP (SFTP) Evaluating files you find at an FTP site
Frequently files are compressed or converted to text files to make them move faster across the Internet. These files can usually be identified by their file name extensions. All of the compressed or converted-to-text files require special software to return the files to their original format; for PCs available decompression programs include ZipGenius, TUGZip, WinZip, PKZip, and Stuffit Expander; for the Macintosh it's Stuffit. To expand .bin, .sit, .sea, and .hqx on a PC, you really need Stuffit Expander. Of the formats listed below, only .txt and .c files are immediately viewable from a terminal session. Macintosh and UNIX or Linux files can have multiple file extensions, i.e. filename.tar.Z is a compressed UNIX or Linux archive file. Some common ftp site file extensions include:
© Page content Copyright 1998 Ray Trygstad; used
by permission. | Home | About... | How do I...? | Modules | Resources | Last Updated by Ray Trygstad on 09/05/05 | Copyright 2004 Illinois Institute of Technology |
|||||||||||||||||||||||||||||||||||||||||||||||||
|