平静

遵循美德行事,纵使没有增加快乐,也可减轻焦虑。

导航

curl

Posted on 2016-09-19 14:10  mdong  阅读(216)  评论(0编辑  收藏  举报

 

   status=`curl -o /dev/null -s -m 5 -w %{size_download}:%{http_code}:%{time_total}:%{time_connect}:%{size_header}:%{time_namelookup} $url`

 

 

curl -o /dev/null -s -w connect:%{time_connect}-transfer:%{time_starttransfer}-total:%{time_total} http://xx

curl -o /dev/null -m 5 -s -w %{size_download}  www.xx.com

  -m 5 :超时设置为5秒

 

 -m/--max-time <seconds> Maximum time allowed for the transfer

 -w/--write-out [format] What to output after completion