This is our old Q&A Site. Please post any new questions and answers at

Hi There, I'm new to tshark, and I want to run some tests before I give it a go on our live server.

I want to catch all packets on a single tcp port number, save them over ten files each with a size of 1KB.

I've tried the following command:

tshark -p -n -i eno1 -f "tcp port 40000" -a files:10 -b files:10 filesize:1024 -w /var/log/tshark/tcpds

It appears to work, I get the following response:

tshark: A capture filter was specified both with "-f" and with additional command-line arguments.

But nothing is being saved at the location specified. I've tried it both with and without sudo, the response is the same. What am I doing wrong?

asked 22 Apr '16, 01:39

elektrovert's gravatar image

accept rate: 0%

Your second option for the -b parameter (filesize:1024) also needs a preceding -b, i.e.

tshark -p -n -i eno1 -f "tcp port 40000" -a files:10 -b files:10 -b filesize:1024 -w /var/log/tshark/tcpds

permanent link

answered 22 Apr '16, 03:34

grahamb's gravatar image

grahamb ♦
accept rate: 22%

Thanks, I'll try that out!

(22 Apr '16, 04:46) elektrovert
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Apr '16, 01:39

question was seen: 11,761 times

last updated: 22 Apr '16, 04:46

p​o​w​e​r​e​d by O​S​Q​A