3 ms·
The need for ifdata(1) has become even more acute with the essential replacement of ifconfig(1) by ip(1), an even more inscrutable memory challange. However, it
by PaulDavisThe1st 5y ago
The need for ifdata(1) has become even more acute with the essential replacement of ifconfig(1) by ip(1), an even more inscrutable memory challange. However, it would be even nicer if its default action when not given an interface name was do <whatever> for all discovered interfaces.
- teddyh 5y agoDo not “ip -brief address show” and “ip -brief link show” serve as suitable replacements for most common uses of ifdata(1)? The ip(8) command even supports JSON output using “-json” instead of “-brief”.
- zwayhowder 5y agoTIL. Thanks. One does have to wonder though, why isn't -brief the default and the current default set to -verbose or -long. I look at -brief on either command and it has all the information I am ever looking for.
- Filligree 5y agoYes, I suppose, but I can never remember those flags.
- hedora 5y agoWell, they're strictly worse for interactive use than ifconfig, from what I can tell from your comment.
- teddyh 5y agoWe were discussing ifdata, not ifconfig. From the documentation, ifdata is explicitly meant for use in scripts. And in scripts, using “ip -brief” or “ip -json … | jq …” may well be suitable replacements for ifdata.
- PaulDavisThe1st 5y agoSure, they do. In fact, I take it back. ifdata(1) is not in any way a replacement for ifconfig(1) for most things. The problem is that just running ifconfig with no arguments showed you everything, which was generally perfect for interactive use. Now to get any information from ip(1) you have to remember an argument name. If you do this a lot, it's almost certainly fine. If you do it occasionally, it's horrible.
- bloopernova 5y agoThose are pretty useful! Although I do wish MacOS had a fully-compatible ip command instead of ifconfig et al.
- jraph 5y agoI find "ip a" (which sounds like IPA) to be a good enough replacement to ifconfig without argument to get an overview of the network state.
- mekster 5y agoIf you just want the IP on interfaces, "ip r" is sufficient and easy to remember.