Upload File via FTP on shell

To upload a file on the shell via FTP (https://en.wikipedia.org/wiki/File_Transfer_Protocol) you can use the wput command.

Therefor you have to install it with your systems package manager (aptitude in this example):

$> sudo apt-get install wput

Now you can upload files like that:

$> wput loacalfiletoupload ftp://user:password@host/path/to/target/on/remote/host

Attention: The target path have to be relative to the FTP-users home directory!

You will get an output like that:

--17:24:10-- `/home/sheldon/Downloads/3.png'
    => ftp://sheldon:xxxxx@72.13.120.89:21/3.png
Connecting to 85.13.150.89:21... connected! 
Logging in as sheldon ... Logged in!
Length: 117,130
93% [===========================================================================================================>           ] 109,568   
17:24:11 (3.png) - `232.6K/s' [117130]

FINISHED --17:24:11--
Transfered 117,130 bytes in 1 file at 107.2K/s

 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.