curl 下载文件测速
用 curl 命令测试下载速度,一行搞定。
用 curl 测试下载速度,不用装额外工具:
Bash
curl -o /dev/null -s -w "Download speed: %{speed_download} bytes/sec\n" \ https://example.com/large-file.zip常用参数:
-o /dev/null— 下载内容丢弃,不写入磁盘-s— 静默模式,不显示进度条-w— 自定义输出格式
也可以指定网卡测速:
Bash
curl -o /dev/null -s -w "%{speed_download}" \ https://speed.cloudflare.com/__down?bytes=10485760 \ --interface tun0