questionmark
questionmark

Reputation: 345

tcpdump: How do I suppress packet information?

When I kill a tcpdump process, I get the following three lines:

NN packets captured
NN packets received by filter
NN packets dropped by kernel

I am piping the output of tcpdump into a txt file and want to keep my terminal clean. Is there a way to suppress this information?

Upvotes: 2

Views: 711

Answers (1)

Jasperan
Jasperan

Reputation: 3638

From this question here, the tcpdump stats and header lines are a part of stderr. So, if you want to suppress this information and store the packet information in a file, you can do:

tcpdump 2> /dev/null > output.txt

Using /dev/null/ will discard the stderr output.

Upvotes: 2

Related Questions