4

Possible Duplicate:
How do I execute FTP commands on one line?

I have the following FTP client conversation:

variscite@variscite-desktop:~$ ftp 192.168.100.10
Connected to 192.168.100.10.
220 (vsFTPd 2.3.5)
Name (192.168.100.10:variscite): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> get hello hello
local: hello remote: hello
200 PORT command successful. Consider using PASV.                                                                       
150 Opening BINARY mode data connection for hello (7796 bytes).                                                         
226 Transfer complete.                                                                                                  
7796 bytes received in 0.01 secs (702.8 kB/s)                                                                           
ftp> exit                                                                                                               
221 Goodbye. 

Is it possible to do this in one command, or write a shell script which does the same? Client computer is Ubuntu 12.04, and I need to do this without installing additional packages.

Alex F
  • 1,889
  • 5
  • 20
  • 21

1 Answers1

18

While I agree that scp is better, it's not only that your client needs the scp command, your server needs to support that as well ofcourse. Enough situations where you can just reach the server through FTP, isn't there?

If you want to get a file from FTP you could just use wget ?

wget ftp://username:password@SERVERNAME/directory/file
Nanne
  • 8,625