Kunaljain's Weblog

December 17, 2007

Listing web server headers

Filed under: Linux Tips & Tricks — Kunal Jain @ 08:58

wget command with -s option will print the headers sent by HTTP servers

#wget -S http://www.example.com
--15:32:43--  http://www.example.com/
      => 'index.html'
Resolving www.example.com...
Connecting to www.example.com||:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Tue, 11 Dec 2007 10:23:45 GMT
Server: Apache
X-Powered-By: PHP/4.4.7
Connection: close
Content-Type: text/html
Length: unspecified [text/html]
    [     <=>                                                     ] 9,038          4.80K/s
15:32:47 (4.80 KB/s) - 'index.html' saved [9038]

If u just want the headers information then pass –spider option to wget

# wget -S --spider http://www.example.com

This will not download the index.html file.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: