commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
For times when netcat isn't available.
Will throw a Connection refused message if a port is closed.
(: </dev/tcp/127.0.0.1/80) &>/dev/null && echo "OPEN" || echo "CLOSED"
There are 11 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.