lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.1k stars 161 forks source link

[Feature Request] max size #536

Closed TimerWolf closed 5 years ago

TimerWolf commented 5 years ago

Add the setting to make it possible to control max size of a file you download, this maybe sounds strange but i will try to make it a bit more clear.

Lets say you download a file that is 1GiB but you only need 50KiB of it, then it would be nice whit an option that let you cancel the download when that limit is reached.

lavv17 commented 5 years ago

There's get1 command which has the range option.

вт, 16 июля 2019, 2:59 antonstarlid notifications@github.com:

Add the setting to make it possible to control max size of a file you download, this maybe sounds strange but i will try to make it a bit more clear.

Lets say you download a file that is 1GiB but you only need 50KiB of it, then it would be nice whit an option that let you cancel the download when that limit is reached.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/536?email_source=notifications&email_token=AAHLWXBLXNN5L5EKYDGWZWTP7UFOZA5CNFSM4ID3X3GKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7K7SHA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLWXCBBSTPFST2UQHNFJLP7UFOZANCNFSM4ID3X3GA .

TimerWolf commented 5 years ago

How exactly does an example look on that option, i don´t get it at all from the docs and can´t find anything close to it in "man page"....

Only thing i found that something that has to to whit control size is "--size-range=RANGE" under "mirror" in the "man page", but that is only a range of between sizes that allows the lftp to ether allow or ignore files that don´t meet the range.

The option i are after is the possibility to start download the file, and automatic abort the download when the size of your choice has been reached and still keep the file in the "current state" even if its incomplete.

lavv17 commented 5 years ago

get1 --source-region=0-1000000 file.ext

чт, 18 июл. 2019 г. в 02:01, antonstarlid notifications@github.com:

Only thing i found that is close and is range is "--size-range=RANGE" under "mirror" on the "man page" but that is only a range of what files that are allowed to download say its download every file between "5MiB - 10MiB"

The option i are after is the possibility to start download the file, and automatic abort the download when the size of your choice has been reached and still keep the file in the "current state" even if its incomplete.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/536?email_source=notifications&email_token=AAHLWXGSXYINQFUOMPCBYCTP76QGJA5CNFSM4ID3X3GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2G2M6A#issuecomment-512599672, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLWXG7F7XZTWPLWEMMY33P76QGJANCNFSM4ID3X3GA .

-- Alexander.

TimerWolf commented 5 years ago

Sounds nice, is that in bytes or what is the range based on?

lavv17 commented 5 years ago

It's in bytes

чт, 18 июля 2019, 11:53 antonstarlid notifications@github.com:

Sounds nice, is that in bytes or what is the range based on?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/536?email_source=notifications&email_token=AAHLWXEDJ5ACDOQLUAPT2N3QAAVRHA5CNFSM4ID3X3GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2HZSMQ#issuecomment-512727346, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLWXDCTA2HDPIQF7K5C53QAAVRHANCNFSM4ID3X3GA .

TimerWolf commented 5 years ago

lavv17: lol, thanks a lot for your help and support works exactly as i need it to do, and thanks for an awesome software!