I'm aware that I can use ethtool eth0|eth1|eth2 to check the existence of a NIC. But I wonder where the files are on the machine that contain information of an existing interface, as I need to use the Ruby language to check for available NICs.
Check the Existence of a Network Interface Card Redhat
linux;networking;rhel;ruby
There is /proc/net/dev, but I am sure there is an actual Ruby API to do this correctly.see http://curioushq.blogspot.com/2011/04/listing-all-network-interfacesdevices.html