snippets > bash-one-liner-to-check-site-downtime

June 26, 2020

Check a site's downtime with this bash one-liner

During a site’s downtime, the following line will print the current time and try to access the given URL one time every 2 seconds. Only the received HTTP headers will be shown.

while true; do date; curl -IX GET '<URL>'; sleep 2; done;