Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: Re: [Wireshark-users] Regarding Tshark

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Thu, 08 Sep 2011 10:38:57 -0400
On 9/8/2011 7:36 AM, Kumar3, Himanshu (Himanshu) wrote:
Hi,
I m using wireshark tool in my project.
I have a folder which contains pcap files.some of  these pcap files are having some audio or video packets. I want to select these pcap files.
Can you just explain me how to use tshark for that.

The following command will produce output specifying the protocols contained in each frame of a capture file.

tshark -Tfields -eframe.protocols -nr <filename>


Using the above with some minimal scripting you can find files which have a particular protocol.


Also: see the following for a bash shell script which produces a list of protocols for each file in a set of capture files.

http://anonsvn.wireshark.org/viewvc/trunk/tools/list_protos_in_cap.sh?revision=36479&view=markup