Полезная опция ifconfig

Вывод ifconfig не слишком удобен для разбора в скриптах, и видимо поэтому у него есть “секретная” (во всяком случае не описанная в ifconfig(1M)) опция configinfo:


# ifconfig -a configinfo
lo0 inet plumb mtu 8232 index 1 set 127.0.0.1 netmask 0xff000000 up
ce0 inet plumb mtu 1500 index 2 set 192.168.1.2 netmask 0xffffff00 up
ce1 inet plumb mtu 1500 index 3 set 192.168.1.3 netmask 0xffffff00 up

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>