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

How to use tshark to output a tcpdump into text-formatted file

0

Hello All,

The following command will export a view of the packet details rather than a one-line summary of the packet into a text file: tshark -V -r input > output.txt

My question is how can I export a view of the packet details AND a one-line summary of the packet into a text file?

Thanks.

asked 27 Sep '12, 20:19

ylin's gravatar image

ylin
1222
accept rate: 0%


One Answer:

0

If you "print" to a file (or in 1.8+, "Export Specified Packet Dissections"->"As plain text") from the GUI you can get both. I am not aware of a way to do this from tshark.

answered 28 Sep '12, 06:24

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

edited 28 Sep '12, 06:24

Thanks Jeff,

The reason I want to use tshark is I want to automate this process not opening Wireshark GUI. Is there some way we can do it?

(28 Sep '12, 07:07) ylin

As I said, I am not aware of a way to do it. However, it looks like Ed Beroset took an interest in this request and opened bug 7782 to add the functionality.

(09 Oct '12, 10:40) JeffMorriss ♦