commands

tshark — Read an offline capture

Read the generated capture without live collection or name resolution. Use display filters only after collection. Use a fresh private workspace; do not apply to a real system.

Formal Syntax & Structure

linux syntaxlinux
tshark -n -r FILE

Parameters & Attributes

NameTypeDescription
-noptionDisable name resolution
-roptionRead capture file
FILEoperandCapture path

Return Value

exit status and output

Offline -r reads and decodes packets from the capture file; -n avoids name resolution. Inspect decoding diagnostics and the selected records rather than treating status as a count of packets.

Working Example

Example Snippetlinux
tshark -n -r sample.pcap
Linux Reference