sudo watch -n 1 "/sbin/ifconfig eth0 | grep -E \"字节|数据包\""
若是英文版linux:
sudo watch -n 1 "/sbin/ifconfig eth0 | grep -E \"bytes|packets\""
也可以不抓packets
sudo watch -n 1 "/sbin/ifconfig eth0 | grep bytes"
sudo watch -n 1 "/sbin/ifconfig eth0 | grep -E \"字节|数据包\""
若是英文版linux:
sudo watch -n 1 "/sbin/ifconfig eth0 | grep -E \"bytes|packets\""
也可以不抓packets
sudo watch -n 1 "/sbin/ifconfig eth0 | grep bytes"