I'd like to send HTTP HEAD request using wget, is it possible?

link|improve this question

feedback

3 Answers

up vote 9 down vote accepted

It's not wget, but you can do that quite easily by using curl.

curl -I http://www.superuser.com/

Produces this output:

HTTP/1.1 301 Moved Permanently                        
Content-Length: 144                       
Content-Type: text/html; charset=UTF-8     
Location: http://superuser.com/
Date: Sat, 09 Oct 2010 19:11:50 GMT
link|improve this answer
This is exactly what I want. – Xie Jilei Oct 11 '10 at 15:23
feedback

Try:

wget -S --spider www.example.com
link|improve this answer
feedback

Though not wget, many perl installs with lwp module will have a HEAD command installed.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.