Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 092012

How to only show respond header with curl command


Sometimes the respond body is huge and you maybe only interested in knowing the headers only, then you can try:

# curl -v -o /dev/null

> GET / HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host:
> Accept: */*
< HTTP/1.1 302 Found
< Location:
< Cache-Control: private
< Content-Type: text/html; charset=UTF-8
< P3P: CP="This is not a P3P policy! See for more info."
< Date: Sun, 09 Dec 2012 13:57:43 GMT
< Server: gws
< Content-Length: 222
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN


 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>