Your Internet Consultant - The FAQs of Life Online

6.5. How do I send files with FTP?

Sending a file to another site using FTP is a simple process. Rather than "get" files from the remote host, you "put" them there using (what else?) the put command. And, as with getting files, you can send multiple files in one batch with the mput command.

For instance, say that your present working directory on your local computer contains five files, as follows:

You can send any or all of these to a remote FTP site. Connect to another host via FTP, find the remote directory in which you want to deposit the goods, and then use the put or mput commands to send the files on their merry way.
put Privacy_Anonymity_FAQ -- will send one file
Note: Some anonymous FTP sites don't allow you to send files; you only can receive them. More commonly, there is a specific directory where you're allowed to put file submissions for the FTP site. Check to see whether the FTP site has a directory called /incoming. If so, you're expected to deposit any incoming files there. If you're using full-privilege FTP, you can put files anywhere on the system that you have permission to write files.

Here's an example of using the put command. (By the way, here I'm putting a file on a computer in Finland.)

$ ftp
Connected to
220 FTP server (Version 5.77 ...) ready.
Name ( anonymous
331 Guest login ok, send ident as password.
230 Guest login ok, access restrictions apply.
ftp> cd /pc/incoming
250 CWD command successful.
ftp> binary
200 Type set to I.
ftp> put
200 PORT command successful.
150 Opening BINARY mode data connection for
226 Transfer complete.
local: remote:
37775 bytes sent in .13 seconds (2.8e+02 Kbytes/s)
ftp> quit
221 Goodbye.

Table of Contents | Previous Section | Next Section