I want to know the HTTP Status of the websites using Ubuntu.
I have used
wget command for that purpose. But the problem is these commands download the complete website page and then search for the header and display it on the screen.
$ curl -I trafficinviter.com HTTP/1.1 200 OK Date: Mon, 02 Jan 2017 14:13:14 GMT Server: Apache X-Pingback: http://trafficinviter.com/xmlrpc.php Link: <http://trafficinviter.com/>; rel=shortlink Set-Cookie: wpfront-notification-bar-landingpage=1 Content-Type: text/html; charset=UTF-8
Same thing happens with
Wgetcommand where the complete page is getting downloaded and unnecessarily consuming my bandwidth.
What I am looking for is: how to get the HTTP status code without actually downloading any page so that I can save my bandwidth consumption. I had tried using curl but not sure is I am downloading complete page or just a header to my system to get the status code.