Nasser Heidari

2009-06-11

See HTTP headers on the command line !

Filed under: Linux,Miscellaneous — Nasser Heidari @ 09:15

You can view HTTP headers on the command line simply by firing up a terminal session and using wget:

#wget -S linax.wordpress.com -O /dev/null

The majuscule “S” gets you the headers and the “-O /dev/null” dumps the file you’re about to retrieve in the bit bucket (rather than into your home directory or where ever). The output you get looks something like this:

[nasser@Zapata /tmp]$ wget -S linax.wordpress.com -O /dev/null                     
--13:44:39--  https://linax.wordpress.com/
Resolving linax.wordpress.com... 72.233.2.58, 76.74.254.123, 76.74.255.123, ...
Connecting to linax.wordpress.com|72.233.2.58|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Server: nginx
  Date: Thu, 11 Jun 2009 09:14:44 GMT
  Content-Type: text/html; charset=UTF-8
  Connection: close
  Vary: Cookie
  X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
  X-Pingback: https://linax.wordpress.com/xmlrpc.php
Length: unspecified [text/html]
Saving to: `/dev/null'

    [                                                                                                                  ] 64,529      45.2K/s   in 1.4s   

13:44:41 (45.2 KB/s) - `/dev/null' saved [64529]

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

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

%d bloggers like this: