6.2.10 The put
command: send a file to the server
To upload a file to the server from your local PC, you use the put
command.
In its simplest form, you just use this with a file name:
put myfile.dat
If you want to store the file remotely under a different name, specify the remote file name after the local one:
put myfile.dat newname.dat
This will send the local file called myfile.dat
, but will store it on the server under the name newname.dat
.
To send an entire directory recursively, you can use the -r
option:
put -r mydir
put -r mydir newname
(If you want to send a file whose name starts with a hyphen, you may have to use the --
special argument, which stops put
from interpreting anything as a switch after it. For example, ‘put -- -silly-name-
’.)