ifconfig(8): Support to filter output by interface groups

Operating Systems / DragonFlyBSD - Aaron LI [aaronly.me] - 26 June 2020 14:53 UTC

Add options '-g ' and '-G ' to select and unselect interfaces by groups in the output of 'ifconfig -a', just like the existing '-d' and '-u' options to select only interfaces that are down or up, respectively. Note that '-g' and '-G' options can be used at the same time to apply both conditions and their arguments may contain shell patterns.

Examples:
- To exclude loopback from the list: ifconfig -a -G lo
- To list interfaces whose group names begin with 't': ifconfig -a -g 't*'

Obtained from FreeBSD (revision 361790; review D25029)

80af6b5d1f ifconfig(8): Support to filter output by interface groups
sbin/ifconfig/ifconfig.8 | 26 ++++++++++++--
sbin/ifconfig/ifconfig.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 112 insertions(+), 5 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share