Wget quick howto: Examples for the most common uses
If you are using linux on your computer or operate your own (virtual-)server you will likely be faced with the problem to transfer data from an other computer/server to your own.
wget is a little linux tool that i usually in a standard installation. Here are a few examples for the most common uses. If you need a more in-depth explanation, please consult the man pages.
Getting a single file from remote location:
Specify the number of downloads attempts:
- wget -t 5 http://www.example.com/myfile.zip
Continue a interrupted download:
Login credentials needed? No problem:
- wget –user=USERNAME –password=PASSWORD http://www.example.com/myfile.zip
Download a webpage or something else recursive:
- wget -r -l 2 http://www.example.com
- loads the page recursive to a depth (level) of 2
Want to download all pictures from a list of websites?
- -A jpg,gif,png,bmp,jpeg specifies a acceptlist of file extensions.
- -i filename to specify a file with the websites
- -q suppresses messages to the console
- wget -i mylist.txt -A jpg,gif,png,bmp,jpeg -q -r -l 10