I want to see how many interfaces(ethernet cards) are
working using single command?
Answers were Sorted based on User's Feedback
Answer / viren
lspci -n | grep 200
class 200 is the address of ethernet adapter
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / alf55
The command:
ifconfig -a | (grep -E 'Link encap:|inet6 addr|inet addr:' |
grep -vE 'inet addr:|inet6 addr')
Would result with an output similar to:
eth0 Link encap:Ethernet HWaddr 00:90:f5:b7:6a:1c
lo Link encap:Local Loopback
sit0 Link encap:IPv6-in-IPv4
wlan0 Link encap:Ethernet HWaddr 00:24:d7:a7:16:c0
So the command:
ifconfig -a | (grep -E 'Link encap:|inet6 addr|inet addr:' |
grep -vE 'inet addr:|inet6 addr') | wc -l
would produce the count.
The problem here is that it would also count usages such as
"eth0:0".
To not count those devices use:
ifconfig -a | (grep -E 'Link encap:|inet6 addr|inet addr:' |
grep -vE 'inet addr:|inet6 addr:|:[0-9][0-9]*') |wc -l
| Is This Answer Correct ? | 1 Yes | 0 No |
hi friends how to reinstall the grub.conf file. once i delete the grub file in perminatle ofter how to get back that file. plz send me ans. regards. madhu.m
tell me command for" to create more than one name to a file".
How will you execute a java program inside a kornshell script?
What is make command in linux?
difference between nfs soft and hard mouniting points?
how to give a normal user reboot and shutdown permission? Plz also mention the step.
What is cpu utilization linux?
What is p in mkdir?
What is the difference between rmdir and rm r?
What is makefile target?
What is mkdir p?
How can I create a file with cmd?