# /usr/bin/ifstat and /usr/sbin/ifstat [Solved]

## reup

I might be mistaken but is there 2 ifstat ? one give a real time list of net operation and the other one gives only a summary

I could track the first one to net-analyzer/ifstat but cannot find the provenance of  /usr/sbin/ifstat

a search on the net gives only information over the first one /usr/bin/ifstat

any idea where they come from, why there is 2 of them and how to find the sbin version ?

reup

----------

## Anon-E-moose

I have /sbin/ifstat and it comes from the iproute2 package.

----------

## reup

thank you Anon-E-moose

I suppose I could have find out using some emerge or eix function but I took too long to think about it

as well I was surprise to find 2 package with the same function but working differently and having the same name

reup

----------

## khayyam

 *reup wrote:*   

> I suppose I could have find out using some emerge or eix function but I took too long to think about it.

 

reup ... afaik emerge or eix doesn't have the ability to corrolate files to packages, for this you need 'equery' (app-portage/gentoolkit) or 'e-file' (app-portage/pfl). The former can provide the package name of an installed file, ie:

```
# equery belongs /sbin/ifstat

 * Searching for /sbin/ifstat ... 

sys-apps/iproute2-3.8.0 (/sbin/ifstat)
```

The latter can show any package (installed or not) which includes a file by that name (useful if say you want to know if there are more than one of such files, as in the case of 'ifstat'), ie:

```
# e-file ifstat | awk '!/(Last|Version)/{print}'

[I] sys-apps/iproute2

   Matched Files: /sbin/ifstat; 

 * net-analyzer/ifstat

   Matched Files: /usr/bin/ifstat;
```

HTH & best ... khay

----------

