Wget output document and headers to STDOUT

前端 未结 5 848
失恋的感觉
失恋的感觉 2020-12-22 18:30

I\'m trying to output the document body and its headers to STDOUT by doing

wget -S -O - http://google.com

...but it shows only the HTML docum

5条回答
  •  渐次进展
    2020-12-22 19:13

    It works here:

        $ wget -S -O - http://google.com
    HTTP request sent, awaiting response... 
      HTTP/1.1 301 Moved Permanently
      Location: http://www.google.com/
      Content-Type: text/html; charset=UTF-8
      Date: Sat, 25 Aug 2012 10:15:38 GMT
      Expires: Mon, 24 Sep 2012 10:15:38 GMT
      Cache-Control: public, max-age=2592000
      Server: gws
      Content-Length: 219
      X-XSS-Protection: 1; mode=block
      X-Frame-Options: SAMEORIGIN
    Location: http://www.google.com/ [following]
    --2012-08-25 12:20:29--  http://www.google.com/
    Resolving www.google.com (www.google.com)... 173.194.69.99, 173.194.69.104, 173.194.69.106, ...
    
      ...skipped a few more redirections ...
    
        [<=>                                                                                                                                     ] 0           --.-K/s              
    

    perhaps you need to update your wget (~$ wget --version GNU Wget 1.14 built on linux-gnu.)

提交回复
热议问题