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

i am using linux and i'm trying through the command line to capture certain number of packets and save them to a pcap file in a certain directory, i used this command but something is wrong it's not being saved !

wireshark -f tcp -i eth1 -k -c 700 -w ~/dev/shm/new.pcap

any help?

asked 15 Jun '15, 10:21

yas1234's gravatar image

yas1234
16182023
accept rate: 0%


Please use dumpcap or tcpdump to capture frames on the CLI.

dumpcap -ni eth1 -c 700 -w ~/new.pcap -f "tcp"
tcpdump -ni eth1 -c 700 -w ~/new.pcap "tcp"

BTW: If you are using the capture filter "tcp" and there is no TCP traffic on eth1, you won't see anything!

Regards
Kurt

permanent link

answered 15 Jun '15, 10:40

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×1,620
×238
×154
×22

question asked: 15 Jun '15, 10:21

question was seen: 1,588 times

last updated: 15 Jun '15, 10:40

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