logo

Home page
Articles for Windows, Linux, OS X
Mac tips and articles
Mac tips
Windows 8 tips and articles
Windows 7 tips and articles
Vista Tips
XP Tips
Linux tips and articles
Read the blog
Online store
Windows, Linux, OS X programs
Links
About

Linux tips and tweaks

Download files in the background and limit the bandwidth

Downloading files from the internet is easy and it is possible to set several going at once. The problem with downloading files using a web browser is that they download at the maximum speed that is possible. Sometimes that is exactly what you want, but this is not always true and if you are downloading at full speed and using all the bandwidth then it may be difficult or impossible to perform another task at the same time. Try watching an online video while a couple of downloads are taking place, or having a video chat with someone, or even just browsing the web. There may not be enough bandwidth left to do this properly. What you need is a way of limiting the bandwidth that downloads use and to let the run quietly in the background while you carry on using the web. This is easier than you might think.

To download files in the background you just need to use a command-line utility called wget. To download a file at maximum speed you just enter wget url where url is the file you want. The wget command accepts a lot of command line parameters that modify the way that it works though and a useful one to use is --limit-rate=XXk where XX is the bandwidth to use. For example, if you enter a command like wget --limit-rate=10k url then the file at url will be downloaded at 10kb/sec.

wget

You don't want to have to type in long and complicated URLs of files, so here's what to do. Open a Terminal window and change to the Downloads directory by typing cd Downloads (Terminal usually opens in your home directory and Downloads is usually a subdirectory of this). Now type in to Terminal wget --limit-rate=50k but don't press the Enter key just yet. Open a web browser window and navigate to the web page with the file that you want. Drag the download link from the web page and drop it on the Terminal window and the URL is automatically entered for you. Just hit Enter in the Terminal window and the file will start downloading at 50kb/sec. You can go back to the web browser and continue sufing the web.

It's possible that not all distros have this drag and drop facility, but it works fine with Ubuntu. Try it with your distro and limit the bandwidth of your downloads if you need to.

Go to Linux tips index...

copyright