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 FILEParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -n | option | Disable name resolution |
| -r | option | Read capture file |
| FILE | operand | Capture 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