Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another fun way to test connectivity in pure bash (need a revision from the past 15 years) is

   timeout 5 bash -c 'cat < /dev/null > /dev/tcp/google.com/80'

Replace google.com and port 80 with your web or tcp server (ssh too!). The command will error/time out if there isn’t a server listening or you have some firewall/proxy in the way.


Timeout is an external program to bash




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: