moreutils completes the shell's toolbox

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Network Interface

The ifdata command checks to see whether a particular network interface exists and is active. It is possible to query the interface for statistics. The simple syntax used by the

ifdata <Option(s)> <Interface>

pattern, makes it clear that the command is primarily designed for use in scripts. Table 3 lists the most important options of ifdata .

Table 3

ifdata: Important Options

Option Meaning
-e Tests whether the interface exists
-pe yes : the interface exists, otherwise no
-pa IPv4-addresses for the interface
-ph Hardware addresses of the interface
-si Input Statistics
-sip Number of input packages
-sib Number of input bytes
-sie Number of input errors
-so Output statistics
-sop Number of output packages
-sob Number of output bytes
-soe Number of output errors
-bips Input bytes per second
-bops Output bytes per second

Conclusion

In addition to some truly helpful tools like pee and ts , the moreutils package has very special tools for a wide variety of tasks. Many users can probably do without many of the utilities, but if you are someone who writes a lot of scripts, then you will quickly come to appreciate the useful shortcuts they afford.

Buy this article as PDF

Express-Checkout as PDF

Pages: 7

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content