diff --git a/tldr/linux/lsfd b/tldr/linux/lsfd index cad7ed5f..40ce2002 100644 --- a/tldr/linux/lsfd +++ b/tldr/linux/lsfd @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - List all files kept open by a specific program: -`lsfd -Q 'PID == {{process_ID}}'` +`lsfd {{-Q|--filter}} 'PID == {{process_ID}}'` - Check what program has a specific file open: -`lsfd -Q "NAME == '{{/path/to/file}}'"` +`lsfd {{-Q|--filter}} "NAME == '{{/path/to/file}}'"` - List open IPv4 or IPv6 sockets: diff --git a/tldr/tcpreplay b/tldr/tcpreplay new file mode 100644 index 00000000..48100d60 --- /dev/null +++ b/tldr/tcpreplay @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# tcpreplay + +> Replay network traffic stored in a `pcap` file. +> More information: . + +- List available network interfaces: + +`tcpreplay --listnics` + +- Replay traffic to interface: + +`tcpreplay -i {{eth0}} {{traffic.pcap}}` + +- Replay traffic to interface and `stdout`: + +`tcpreplay -i {{eth0}} --verbose {{traffic.pcap}}` + +- Replay traffic to interface as fast as possible: + +`tcpreplay -i {{eth0}} --topspeed {{traffic.pcap}}` + +- Replay traffic to interface at given Mbps: + +`tcpreplay -i {{eth0}} -M {{10}} {{traffic.pcap}}` + +- Replay traffic to interface several times: + +`tcpreplay -i {{eth0}} --loop={{num_times}} {{traffic.pcap}}`