How can I set a timeout for wget
and get a notification the connection times out in 20 seconds?
So far I've tried the following command
wget --spider www.example.com
How can I set a timeout for wget
and get a notification the connection times out in 20 seconds?
So far I've tried the following command
wget --spider www.example.com
wget -T 20 --spider www.example.com || ping -n 1 www.example.com
However, ICMP/pings aren't always useful for determining site availability since they have been used in distributed denial of service attacks since the beginning of the century.