0
iftop -t -L1 -s1

Output:

enter image description here

iftop -t -L1 -s1 | grep "Total send and receive rate:"

Output:

enter image description here

How can I grep just the "Total send and receive state:" line?

1

It seems that iftop is writing the unwanted lines to STDERR. To remove those for your grep use a command line as follows.

iftop -t -L1 -s1 2> /dev/null | grep "Total send and receive rate:"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.