To get response time of website/url with curl use following command:
$ curl -o /dev/null -s -w %{time_total}\\n http://www.google.com
Output:
0.889
We can also use following command to get different types of times with curl:
$ curl -o /dev/null -s -w
{time_connect}:%{time_starttransfer}:
%{time_total}\\n http://www.google.com
Output:
0.501:0.867:0.867
Above commands will written the output in seconds.
-Sany
Error :
-w {time_connect}
is
-w %{time_connect}
Cheers
Thanks for update.
Please correct the type in both commands