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 |
Explain about kernel file in linux?
What is sudo bash command?
What command do you type to find help about the command who?
what is the command to make a process to run in the background from foreground?
How do I do a whois search?
What is bc command in unix?
In order to improve your system’s security you decide to implement shadow passwords. What command should you use?
You want to verify which lines in the file kickoff contain ‘bob’. Which of the following commands will accomplish this?
how many hard disks can i able to connect to desktop pc and server (IDE & SATA) pls send this ans to my mail : ping2pavan@gmail.com
What is nslookup command?
Did you work with linux? What flavors and versions?
How do you create a file?