简体   繁体   中英

cURL command - how to check network download speed rate

I have to download some large files use cURL command, But cURL will hang for hours due to slow networks.

Is there any cURL options or good way to check download speed? I want to stop this cURL command when slow download speed.

Now I check the size of downloaded file each 1 second for speed check. But it seems not a good way.

--max-time cURL option not works too, because file size is unknown.

Thank you!

Take a look at speed-limit in the man page:

If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with -y and is 30 if not set.

So you can say --speed-limit 100 and it will exit if less than 100 bytes per second are downloaded over a 30 second period.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM