Can I use wget to check , but not download

后端 未结 5 627
失恋的感觉
失恋的感觉 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:40

    If you are in a directory where only root have access to write in system. Then you can directly use wget www.example.com/wget-test using a standard user account. So it will hit the url but because of having no write permission file won't be saved.. This method is working fine for me as i am using this method for a cronjob. Thanks.

    sthx

提交回复
热议问题