curl简单使用
curl simple usage
a long time ago,i wanna to find a tool which can test bandwidth when i use proxy.later i find a tool named speedtest-cli,however it cannot be used with proxychains.at last i find a method to download the webpage of google using curl and calculate the time downloading.in a fact,it is not reliabled.
today i find that the curl itself has a argument which can calculate the time accessing webpage.
1 | --- ~ » curl -s -w "%{time_total}\n" -o /dev/null www.biadu.com |
while used in script,we need add timeout
1 | --- ~ » timeout 4 curl -s -w "%{time_total}\n" -o /dev/null www.biadu.com |
it can also get the header of webpage.
1 | --- ~ » curl -I www.baidu.com |