Can I use wget to check , but not download

后端 未结 5 636
失恋的感觉
失恋的感觉 2021-01-30 04:53

Can I use wget to check for a 404 and not actually download the resource? If so how? Thanks

5条回答
  •  甜味超标
    2021-01-30 05:39

    Yes easy.

    wget --spider www.bluespark.co.nz
    

    That will give you

    Resolving www.bluespark.co.nz... 210.48.79.121
    Connecting to www.bluespark.co.nz[210.48.79.121]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
    200 OK
    

提交回复
热议问题