§ 11.C.3: ftp: Multiple File Transfers
To transfer several files with one ftp subcommand, use the
multiple put and get:
ftp> mput file1 file2 file3
ftp> mget file1 file2 file3
Let's use mput with the wildcard character *
(every file) to backup all of your C programs in
directory ~/development/prog
on local:
ftp> lcd ~/development/prog
ftp> mput *.c
The behavior of ftp during muliple transfer is controlled
somewhat by whether you toggle "prompting" on or off with
Prompting "on" prompts you
before each file is transfered, prompting "off" copies all files
without stopping. Without prompting,
ftp should respond with something like:
200 PORT command successful
150 Opening ASCII mode for big-math.c (97 bytes)
226 Transfer complete
local: big-math.c remote: big_math
104 bytes received in 0.022 seconds (4.6 Kbytes/s)
200 PORT command successful
150 Opening ASCII mode for myprog.c (61 bytes)
226 Transfer complete
local: myprog.c remote: myprog.c
67 bytes received in 0.022 seconds (2.9 Kbytes/s)