IFDATA(1)

πŸ“¦
version 0.70 Β· 3 versions
  • 0.70 Β· debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.70 Β· alpine 3.24
  • 0.70 Β· arch rolling
, in debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– IFDATA(1) πŸ’–

okay bestie, so this is ifdata, and it lives in the moreutils manual, section 1. yes, that moreutils. the little grab-bag of tools that goes absolutely feral. and ngl, this one is lowkey the moment.


✨ NAME ✨

ifdata β€” get network interface info without parsing ifconfig output πŸ¦‹


🌸 SYNOPSIS 🌸

ifdata [options] {iface}

πŸŽ€ DESCRIPTION πŸŽ€

so here's the vibe: ifdata can check if a network interface even exists, or it can spill the tea about that interface β€” like its IP address, etc.

and here's the part that ate πŸ’… β€” unlike ifconfig or ip, ifdata gives you simple to parse output that is literally designed to be easily used by a shell script. it's giving "written by someone who has suffered through awk-ing ifconfig output at 3am." main character energy fr fr.


πŸ’– OPTIONS πŸ’–

  • -h β€” print out a help summary. cute, quick, we love a summary.
  • -e β€” test to see if the interface exists. exits nonzero if it does not. a little vibe check for your interface, basically. 😌
  • -p β€” prints out the whole configuration of the interface. the full lore drop.
  • -pe β€” prints "yes" or "no" depending on whether the interface exists or not.
  • -pa β€” prints the IPv4 address of the interface.
  • -pn β€” prints the netmask of the interface.
  • -pN β€” prints the network address of the interface. (capital N, bestie, don't mix it up with -pn πŸ‘€)
  • -pb β€” prints the broadcast address of the interface.
  • -pm β€” prints the MTU of the interface.
🌈 heads up: the following options are Linux only. no cap.
  • -ph β€” prints the hardware address of the interface. exits with a failure exit code if there is not a hardware address for the given network interface. 😭
  • -pf β€” prints the flags of the interface.
  • -si β€” prints out all the input statistics of the interface. the whole input saga.
  • -sip β€” prints the number of input packets.
  • -sib β€” prints the number of input bytes.
  • -sie β€” prints the number of input errors.
  • -sid β€” prints the number of dropped input packets.
  • -sif β€” prints the number of input fifo overruns.
  • -sic β€” prints the number of compressed input packets.
  • -sim β€” prints the number of input multicast packets.
  • -so β€” prints out all the output statistics of the interface. and now the output saga ✨
  • -sop β€” prints the number of output packets.
  • -sob β€” prints the number of output bytes.
  • -soe β€” prints the number of output errors.
  • -sod β€” prints the number of dropped output packets.
  • -sof β€” prints the number of output fifo overruns.
  • -sox β€” prints the number of output collisions.
  • -soc β€” prints the number of output carrier losses.
  • -som β€” prints the number of output multicast packets.
  • -bips β€” prints the number of bytes of incoming traffic measured in one second. bytes-in-per-second, iykyk πŸ“
  • -bops β€” prints the number of bytes of outgoing traffic measured in one second.

πŸ‘‘ AUTHOR πŸ‘‘

Benjamin BAYART


and that's the whole page, bestie 🫢 written by Benjamin BAYART, shipped as part of moreutils, dated 2006-03-07 β€” and that's your IFDATA(1) footer, mwah πŸ’‹ go parse something. πŸ’œ

πŸ“¦ where this page comes from