---
name: "ifdata"
section: "1"
platform: "linux"
package: "moreutils"
version: "0.70-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ifdata"
---

# ifdata(1)

get network interface info without parsing ifconfig output

## NAME

ifdata - get network interface info without parsing ifconfig output

## SYNOPSIS

**ifdata**  \[options\] {*iface*}

## DESCRIPTION

**ifdata** can be used to check for the existence of a network interface, or to get information about the interface, such as its IP address. Unlike **ifconfig** or **ip**, **ifdata** has simple to parse output that is designed to be easily used by a shell script.

## OPTIONS

- FC**-h**F\[0\]

  Print out a help summary.

- FC**-e**F\[0\]

  Test to see if the interface exists, exit nonzero if it does not.

- FC**-p**F\[0\]

  Prints out the whole configuration of the interface.

- FC**-pe**F\[0\]

  Prints "yes" or "no" if the interface exists or not.

- FC**-pa**F\[0\]

  Prints the IPv4 address of the interface.

- FC**-pn**F\[0\]

  Prints the netmask of the interface.

- FC**-pN**F\[0\]

  Prints the network address of the interface.

- FC**-pb**F\[0\]

  Prints the broadcast address of the interface.

- FC**-pm**F\[0\]

  Prints the MTU of the interface.

Following options are Linux only.

- FC**-ph**F\[0\]

  Prints the hardware address of the interface. Exit with a failure exit code if there is not hardware address for the given network interface.

- FC**-pf**F\[0\]

  Prints the flags of the  interface.

- FC**-si**F\[0\]

  Prints out all the input statistics of the interface.

- FC**-sip**F\[0\]

  Prints the number of input packets.

- FC**-sib**F\[0\]

  Prints the number of input bytes.

- FC**-sie**F\[0\]

  Prints the number of input errors.

- FC**-sid**F\[0\]

  Prints the number of dropped input packets.

- FC**-sif**F\[0\]

  Prints the number of input fifo overruns.

- FC**-sic**F\[0\]

  Print the number of compressed input packets.

- FC**-sim**F\[0\]

  Prints the number of input multicast packets.

- FC**-so**F\[0\]

  Prints out all the output statistics of the interface.

- FC**-sop**F\[0\]

  Prints the number of output packets.

- FC**-sob**F\[0\]

  Prints the number of output bytes.

- FC**-soe**F\[0\]

  Prints the number of output errors.

- FC**-sod**F\[0\]

  Prints the number of dropped output packets.

- FC**-sof**F\[0\]

  Prints the number of output fifo overruns.

- FC**-sox**F\[0\]

  Print the number of output collisions.

- FC**-soc**F\[0\]

  Prints the number of output carrier losses.

- FC**-som**F\[0\]

  Prints the number of output multicast packets.

- FC**-bips**F\[0\]

  Prints the number of bytes of incoming traffic measured in one second.

- FC**-bops**F\[0\]

  Prints the number of bytes of outgoing traffic measured in one second.

## AUTHOR

Benjamin BAYART
