Update cheatsheets

This commit is contained in:
ivuorinen
2024-12-24 00:17:42 +00:00
parent aca947410c
commit 69763d64de
2 changed files with 35 additions and 2 deletions

View File

@@ -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:

33
tldr/tcpreplay Normal file
View File

@@ -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: <https://tcpreplay.appneta.com/>.
- 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}}`