LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to resume an interrupted wget using wget.log? (https://www.linuxquestions.org/questions/linux-software-2/how-to-resume-an-interrupted-wget-using-wget-log-887187/)

misterJ 06-19-2011 12:12 PM

How to resume an interrupted wget using wget.log?
 
If a wget download is interrupted (like if I have to shutdown prematurely), I get a wget.log with the partial download.

How can I later resume the download using the data in wget.log? I have searched high and low (including wget manual) and cannot find how to do this. Is it so obvious that I did not see it?

The wget -c option with the wget.log as the argument to the -c option does not work.

What I do do is open the wget.log and copy the URL and then paste it into the command line and do another wget. This works but the download is started from the beginning, which means nothing in the wget.log is used. There's got to be a better way, I assume. But how?

Running Kubuntu. Thanks.

speck 06-19-2011 01:19 PM

wget -c will resume the download from the point where it stopped (will append to the partially downloaded file). I'm not sure why you're trying to use the wget.log file in this instance.

Code:

user@host$ wget -c 'ftp://slackware.mirrors.tds.net/pub/slackware/slackware-13.37/slackware/xap/mozilla-firefox-4.0-i486-2.txz'
--2011-06-19 11:13:00--  ftp://slackware.mirrors.tds.net/pub/slackware/slackware-13.37/slackware/xap/mozilla-firefox-4.0-i486-2.txz
          => "mozilla-firefox-4.0-i486-2.txz"
Resolving slackware.mirrors.tds.net (slackware.mirrors.tds.net)... 204.246.0.134
Connecting to slackware.mirrors.tds.net (slackware.mirrors.tds.net)|204.246.0.134|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/slackware/slackware-13.37/slackware/xap ... done.
==> SIZE mozilla-firefox-4.0-i486-2.txz ... 11465820
==> PASV ... done.    ==> RETR mozilla-firefox-4.0-i486-2.txz ... done.
Length: 11465820 (11M) (unauthoritative)

54% [=============================================>                                      ] 6,304,320    618K/s  eta 12s   

user@host$ wget -c 'ftp://slackware.mirrors.tds.net/pub/slackware/slackware-13.37/slackware/xap/mozilla-firefox-4.0-i486-2.txz'
--2011-06-19 11:13:27--  ftp://slackware.mirrors.tds.net/pub/slackware/slackware-13.37/slackware/xap/mozilla-firefox-4.0-i486-2.txz
          => "mozilla-firefox-4.0-i486-2.txz"
Resolving slackware.mirrors.tds.net (slackware.mirrors.tds.net)... 204.246.0.134
Connecting to slackware.mirrors.tds.net (slackware.mirrors.tds.net)|204.246.0.134|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/slackware/slackware-13.37/slackware/xap ... done.
==> SIZE mozilla-firefox-4.0-i486-2.txz ... 11465820
==> PASV ... done.    ==> REST 6324480 ... done.   
==> RETR mozilla-firefox-4.0-i486-2.txz ... done.
Length: 11465820 (11M), 5141340 (4.9M) remaining (unauthoritative)

100%[++++++++++++++++++++++++++++++++++++++++++++++======================================>] 11,465,820  579K/s  in 9.7s   

2011-06-19 11:13:38 (519 KB/s) - "mozilla-firefox-4.0-i486-2.txz" saved [11465820]


jefro 06-19-2011 01:21 PM

http://www.cyberciti.biz/tips/wget-r...-download.html

The problem is has a few deals to it. One is the source has to have the ability to resume and your local file has to be good and in the correct directory that wget is now trying to use.

Better check the download checksum when done.


All times are GMT -5. The time now is 05:17 AM.