Nice hint and tips for using wget

I think most of us have used the wget command once or twice.
What i will do now is explain a few tips and tricks on using this useful command.
1. Download many files at the same time
2. Download and resume
3. Limit your download to a specific speed
4. Split your download for faster results
5. Log your download
6. Download in the background and keep using the terminal

Common use of wget:

wget http://example.com/bleh.tar

1. Download many files at the same time
There is more then one way to do this, my favourite one is to create a .txt file using the vi command and write in it the URLs of the files you want to download

vi downloads.txt

write in it

http://example.com/bleh.tar

http://example.com/tfeh.tar

http://example.com/blah.tar

http://example.com/stuff.tar

Then run wget using the -i argument

wget -i downloads.txt

2. Download and resume
You can force wget to resume any broken download like this

wget -i -c downloads.txt

3. Limit your download to a specific speed
You can use this when downloading a big file and you don’t want the connection to choke

wget -c –limit-rate=20k http://example.com/bigstuff.tar

4. Split your download for faster results
Just like free download manager or download accelerator on windows :D
To do this we will have to use awget instead of wget

aget -n=5 http://example.com/bleh.tar

Note that i could not find aget in the repos. However you can download a .deb package from http://www.enderunix.org/aget/

5. Log your download
Log all your downloads into a file

wget -c -o downloads.log -i downloads.txt

6. Download in the background and keep using the terminal

wget -cbi downloads.txt

Note that doing the above will automatically create a log file for the download process
To specify your own log file location do the following

wget -cb -o downloads.log -i download.txt

Hope this helps :)
// Jo