It's probably a good idea (just because it's a little easier) to be in the directory on your machine that you want to copy files from a remote machine into (although you can change local directory in ftp
, it's just easier to be in the directory before you start).
To connect to a remote machine, you just do
is either a URL; e.g., ftp.remote.com or remote.com, or a address; e.g., 192.168.1.10.
You use the -i
so you can get
) multiple files easily.
Now, the above only connects you to the machine and you need to cd
(change directory) to the directory where the files are on the remote and you have to have permission to do so (granted by the administrator of the remote); if the files you want are in the /tmp
directory, you should be able to cd /tmp
. You most likely will not be able to cd /home/user
, though, so have the remote copy the files to someplace you can get to (frequently that would be /pub/some_directory
-- you need to know where that is).
So, assuming you can get into the directory, you can see the content of the directory with
Then you would get the files you want with
get file01 file02 ...
Or, if the files have similar names (that you would list with ls *name*
or something similar, you can
(that's why the -i
is multiple-get; you could do mget *
to get every file in the directory).
So, to cut to the chase,
ftp -i remote
get file1 file2 ...
Home this helps.