You don’t have to open up your FTP client (whatever it is) to connect to the server when all you want is upload a single file or a bunch of directories.
Using wput is simple and very efficient when you want to do send files through FTP connections.
Ubuntu or Debian users can install wput using the
sudo apt-get install wput
Fedora users can do it with
sudo yum install wput
And there’s a Windows version on sourceforge.
wput command syntax
To send all files from a local directory to the remote FTP server the syntax would be something like this:
wput *.* ftp://username:password@hostname/recipient-folder/
In the following examples I’ll assume my username is slinkydog and my password is
dachshund. My server address would be
toystoryfun.com (I didn’t check if it exists and it doesn’t matter. Use your own server names here). The recipient folder in the server will be called
This is the first example on how to send a single file through your FTP connection:
wput filename.txt ftp://slinkydog:firstname.lastname@example.org/characters/
How to deal with wput verbosity
You can reduce the verbosity, using
wput --less-verbose filename.txt ftp://slinkydog:email@example.com/characters/
You can use the option
--verbose to increase the command output even more or the option
quit to simply suppress verbosity.
I usually prefer to send wput to work in the background which sets my terminal free to run other stuffs. This is how to do it:
wput --background *.* ftp://slinkydog:firstname.lastname@example.org/characters/
If you wantto know what’s happening (or happened) during the transference just read the file
How to limit the bandwidth usage while sending files with wput
--limit-rate can be used to limit the average use of your network bandwidth. In the following example I’ll limit it to 500 K:
wput --limit-rate=500K --less-verbose about.php index.php styles.css ftp://slinkydog:email@example.com/characters/
In the example above I limited the average rate of bandwidth usage to 500 K, decreased verbosity level and told wput to transfer the files:
You can use wildcards like
*.php if you want.
How to resume incomplete uploads with wput
Wput resumes incomplete transfers by default. So you don’t need to do anything special here.
Though you can force it to do it all again by telling the program to reupload:
wput --reupload --less-verbose --limit-rate=1M *.php *.css *.html ftp://slinkydog:firstname.lastname@example.org/characters/
Take a look at the man page of the command to see more options:
… and have fun!