Re: nc missing option -z

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13Feb2013 03:21, Suvayu Ali <fatkasuvayu+linux@xxxxxxxxx> wrote:
| I used to use netcat to check if a particular host is up or if I have
| internet connection before I run a few scripts. [...]
| Any ideas what happened to it?  What can I use as replacement?

If I want to know if I have an internet connection I look for a default
route in the output of "netstat -an", thus:

  netstat -rn | egrep '\''^(default|0\.0\.0\.0) +[1-9]'\'' >/dev/null

No default route - no general purpose internet connection.
A default route but no connectivity? Then something else is wrong that
needs fixing anyway.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx>

We _like_ the starter!  Wouldn't have it any other way.  If it doesn't grind,
take it back to the dealer and make them fix it!
        - Jon N. Steiger, DoD#1038, <stei0302@xxxxxxxxxxxxxxxxxxxx>
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux