bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] limit download size -- 201901233


From: Yousong Zhou
Subject: Re: [Bug-wget] limit download size -- 201901233
Date: Thu, 24 Jan 2019 10:23:37 +0800

On Thu, 24 Jan 2019 at 02:32, Tim Rühsen <address@hidden> wrote:
>
> On 23.01.19 03:47, address@hidden wrote:
> > Hi,
> >   acording to
> >     $wget --help
> >   i should send reports and suggestions to this address, so i hope i'm 
> > doing right here.
> >
> >    the version of my distribution, given by the above command, is "GNU Wget 
> > 1.18"
> >
> >    and i don't seem to see an option to limit the retrieval to a certain 
> > amount of data or a range.
> >    is it possible?
> >
> > thanks in advance and happy new year,
> >
> > Zui
> > 201901233
> >
>
> You could set the Range HTTP header - many servers support it.
>
> Like
>
> wget --header "Range: bytes=0-10000" https://www.example.com/filename
>
> Regards, Tim
>

At least for wget 1.19.1, it will ignore 206 "Partial Content", unless
we need to make it think it's continuing previous partial download.
Specifying Range header is not an reliable option in this regard

    echo -n aaa >b
    wget -c -O b --header "Range: 3-1000" URL

                yousong



reply via email to

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