Why is there such difference in number of packets captured by tcpdump when the output is written to console and to file?
$ tcpdump
...
1681 packets captured
1681 packets received by filter
0 packets dropped by kernel
vs.
# tcpdump > /root/dump.txt
...
11 packets captured
12 packets received by filter
0 packets dropped by kernel
In both cases I terminated the comand with Ctrl+C after few seconds.
Edit:
Command tcpdump -w /root/dump.txt
also captures just few packets. This behavior is consistent, I tried many times.
-w
.