You're a Copying Machine






You’re a Copying Machine

Copying a file from one place to another is simple (but don’t forget — computers are involved). Here’s how it works: Log in to the other computer for FTP, and tell it what you want to copy and where you want it copied.

Getting connected

To run the ftp program, you type ftp and the name of the host computer where the FTP server you want is:

ftp ftp.iecc.com

(That’s John’s computer. It has files, but perhaps not all that many in which you’re interested, unless you care deeply about techniques for translating one programming language to another.) Substitute the FTP server’s name for ftp.iecc.com.

Assuming that the FTP server is not too busy to let you connect, it greets you with a message like this:

Connected to ftp.iecc.com.
20 tom.iecc.com FTP server (BSDI Version 7.00LS) ready.

The computer asks for your username and password on the host computer. If you don’t have an account on the computer, don’t panic. See the section “No Names, Please,” later in this chapter. (On this particular computer, unless you happen to be one of the authors of this book, it’s extremely unlikely that you have an account. We’re using it as an example.)

If the FTP server likes you, it says something like this:

230 User johnl logged in.
ftp>

The ftp> is the FTP prompt, telling you that it’s ready for you to type a command.

Getting your file

To copy a file from the FTP server (the host computer) to your own computer, use the get command:

get README

Substitute the name of the file in place of README in this command. FTP says something like this:

150 Opening ASCII mode data connection for README (12686 bytes).
226 Transfer complete.
local: README remote: README
12979 bytes received in 28 seconds (0.44 Kbytes/s)

FTP always tells you much more than you want to know about the transfer. When it says that the transfer is complete, you have the file.

 Tip  You have to type the filename by using the syntax the server uses. In particular, if the server is a UNIX system (as most are), upper- and lowercase are different, so README, Readme, and readme are different filenames.

Getting out

When you finish transferring files, type the command quit. FTP responds with this heartfelt message:

221 Goodbye.


 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows