Network Connectivity

Lonni J Friedman netllama at gmail.com
Fri Aug 10 07:36:31 PDT 2012


That command will only work if the device is associated with eth0.
Otherwise, it will return nothing.

On Fri, Aug 10, 2012 at 7:28 AM, Sean Keating <sean at csupport.com> wrote:
> The following command will return the ip address info if the device
> exists and is up. (Your ifconfig command may be in a different
> directory.)
>
> /sbin/ifconfig eth0 2>/dev/null|grep "inet addr"
>
> Sean Keating
>
>
> On Fri, 2012-08-10 at 00:14 -0700, Steve Jardine wrote:
>> All,
>>
>>    Does anyone have an idea as to how to determine if any device has network connectivity. Where devices are WiFi (wlan0), Ethernet (Eth0), Wireless (usb0-2)? I need to trigger an event if network connectivity exists.


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama at gmail.com
LlamaLand                       https://netllama.linux-sxs.org


More information about the Linux-users mailing list