wget - Downloading from the command line

Written by Guillermo Garron .
Date: 2007-10-30 10:36:30 -0400

Tips and Tricks of wget

When you ever need to download a pdf, jpg, png or any other type of picture or file from the web, you can just right-click on the link and choose to save it on your hard disk. This is possible for one or even up to five files, but more than that.

wget is a GNU program, which is used a lot in Linux, it can download pages, and files from the internet directly to your computer.

If you do not have it installed you can install on:

Debian or Ubuntu

sudo apt-get install wget

wget tips

Download a single file


Download the whole site recursively

wget -r

Download all files of a specific type: (pdf and jpg for example)

wget -r -A pdf,jpg

Follow external links

wget -r -H -A pdf,jpg

Follow external links only to specific server

wget -r -H -A pdf,jpg -D

Limit the levels you will dig when in recursive mode (default is 5)

wget -r -l 2

Limit the bandwidth used by wget (to 20KB/s in this case)

wget --limit-rate=20k

As you can see, wget is very useful and flexible, use it at your wish.


If you enjoyed the article, please share it

twitter | facebook | google+ | linkedin | email | reddit



My name is Guillermo Garron. I am telecommunications engineer from Bolivia

I like technology a lot, and this site is mainly dedicated to that

Social feeds

rss | twitter | email | google+

Posts via email

If you use the letter icon above and subscribe to my tinyletter newsletter, you will get one to two emails, related to this site, or not. If what you want is to get the posts of this site via email, use the form below

Enter your email address:

Delivered by FeedBurner