11.C.3: Transfering Multiple Files | 11: Multiple Machines | 11.C.1: Help and Navigation | Contents |
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:
200 PORT command successful
150 Opening BINARY mode data connection for index.html
226 Transfer complete
2183 bytes sent in 0 seconds (2.1 Kbytes/s)
To make sure it was really copied (not a bad thing to do):
ftp> ls -l
ftp
has two modes:
ascii | for transfering text files (like
index.html |
binary | for transferring binary files |
Text files will usually transfer successfully in either mode. Entering
Before we put a file into the directory
Now we'll see how to transfer a group
of files with one command.
ftp> ascii
prior to
transfer places ftp into ascii mode. Here
we transfer the binary file
CONST.GIF
:
ftp> binary
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
:
ftp> lcd figs
ftp> put CONST.GIF
11.C.3:
Transfering Multiple Files
11:
Multiple Machines
11.C.1:
Help an Navigation
Contents