11.C.3: Next Transfering Multiple Files  11: Up Multiple Machines  11.C.1: Prev Help and Navigation  Contents Contents

Basic

§ 11.C.2: ftp: Transfering Individual Files


To transfer files from one machine to another, you use the put and get ftp subcommands:
ftp> put index.html put file from local to remote
ftp> get index.html get file from remote to local

It is important to keep the action of these commands straight. It is all to easy to wipe out your work by writing over it with your old file. One way to keep them straight is to remember that the command verb always acts on the remote machines files.

Try it! If the file transfers successfully, you will get a message like:

To make sure it was really copied (not a bad thing to do):

Note that ftp has two modes:
asciifor transfering text files (like index.html
binaryfor transferring binary files

Text files will usually transfer successfully in either mode. Entering ftp> ascii prior to transfer places ftp into ascii mode. Here we transfer the binary file CONST.GIF:

Before we put a file into the directory backup-cluster, we need to get into the directory on the local computer containing that file. The file we are going to put is CONST.FIG and is in ~/public-html/figs:

Now we'll see how to transfer a group of files with one command.


11.C.3: Next Transfering Multiple Files  11: Up Multiple Machines  11.C.1: Prev Help an Navigation  Contents Contents