#!/bin/bash # Display the Kernel modules involved in supporting the network interfaces. # Usage: # $ find_network-drivers eth0 for f in /sys/class/net/*; do dev=$(basename $f) driver=$(readlink $f/device/driver/module) if [ $driver ]; then driver=$(basename $driver) fi addr=$(cat $f/address) operstate=$(cat $f/operstate) printf "%10s [%s]: %10s (%s)\n" "$dev" "$addr" "$driver" "$operstate" done