bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Make wget capable of starting download from a spe


From: Yousong Zhou
Subject: Re: [Bug-wget] [PATCH] Make wget capable of starting download from a specified position.
Date: Sat, 21 Dec 2013 21:27:45 +0800
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Dec 21, 2013 at 11:05:01AM +0100, Dagobert Michelsen wrote:
> Hi,
> 
> Am 21.12.2013 um 10:24 schrieb Yousong Zhou <address@hidden>:
> > In my situation, wget was trigger on the remote machine like the
> > following:
> > 
> >    wget -O - --start-pos "$OFFSET" "$URL" | nc -lp 7193
> > 
> > Then on local machine, I would download with:
> > 
> >    nc localhost 7193
> > 
> > Before these, a local forwarding tunnel has been setup with ssh to make
> > this possible.  So in this case, there was no local file on the machine
> > where wget was triggerred and `--continue' will not work.  I am sure
> > there are other cases `--start-pos' would be useful and that
> > `--start-pos' would make wget more complete.
> 
> 
> When I just look at your problem it seems to be easier to set up the tunnel
> slightly different and pull with standard wget. If the URL looks like
>   http://<host>:<port>/<rest>
> and you set up the tunnel with
>   ssh -L 7193:<host>:<port> <machine-where-you-called-wget-previously>
> and then just
>   wget http://localhost:7193/<rest>
> the range requests would be sent by wget just fine to the initial server and
> you could also safely use -c on further wget invocations (or with proper 
> values
> for -t / -T automatically).

Yes, this is more sensible a way of doing the download once the tunnel
is up.  Thank you for pointing this out.  Really, one thing that has
caught much of my concern when redirecting netcat stdout to a file is
that it may not good for my hard disk with hours of continuous disk
writing.  I may count on wget's behavior on this ;)

In other cases, `--start-pos' may still come in handy, for example, when
trying to peek just parts of each file on server without fully
downloading them, or doing parallel downloads with some simple
scripting.  Just name a few I come up with.


        yousong

> 
> 
> Best regards
> 
>   -- Dago
> 
> -- 
> "You don't become great by trying to be great, you become great by wanting to 
> do something,
> and then doing it so hard that you become great in the process." - xkcd #896
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]