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

How to save pcap files in tshark

0

I use tshark to analyze packets, and want to save the packets that I concerned into a separate pcap/pcapng file(in order to have a look at the packets later). Now that I can get packet info(pinfo), how can I write it into a pcap file?

asked 02 Apr '14, 20:53

metamatrix's gravatar image

metamatrix
56161619
accept rate: 100%


One Answer:

0

This command did it for me: -r infile -w outfile -Y Display Filter -F file format

tshark -r vit.pcapng -Y tcp.analysis.flags -w vit_tcpflags.pcap -F pcap

answered 03 Apr '14, 09:33

mrEEde's gravatar image

mrEEde
3.9k152270
accept rate: 20%