Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do 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”.


Sure, 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.


TIL. 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.


Yes, I suppose, but I can never remember those flags.


Amazing how many new things come about because people don't know or don't remember how to use the existing things.


ifdata is not meant for interactive use.


Well, they're strictly worse for interactive use than ifconfig, from what I can tell from your comment.


We 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.


Those are pretty useful!

Although I do wish MacOS had a fully-compatible ip command instead of ifconfig et al.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: