mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-01 05:54:13 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/linux/lvscan
Normal file
26
tldr/linux/lvscan
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lvscan
|
||||
|
||||
> Scan (list) all logical volumes in the system.
|
||||
> Part of the LVM (Logical Volume Manager) suite.
|
||||
> More information: <https://manned.org/lvscan>.
|
||||
|
||||
- List all logical volumes:
|
||||
|
||||
`lvscan`
|
||||
|
||||
- List only active logical volumes:
|
||||
|
||||
`lvscan --active`
|
||||
|
||||
- List only inactive logical volumes:
|
||||
|
||||
`lvscan --inactive`
|
||||
|
||||
- Display logical volumes in JSON format:
|
||||
|
||||
`lvscan --reportformat json`
|
||||
34
tldr/linux/xdp-filter
Normal file
34
tldr/linux/xdp-filter
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# xdp-filter
|
||||
|
||||
> Load and manage an eBPF XDP packet filter.
|
||||
> Part of the xdp-tools collection.
|
||||
> More information: <https://github.com/xdp-project/xdp-tools/tree/main/xdp-filter#running-xdp-filter>.
|
||||
|
||||
- Load the filter on an interface in skb (generic) mode with default allow policy:
|
||||
|
||||
`sudo xdp-filter load {{[-p|--policy]}} allow {{[-m|--mode]}} skb {{network_interface}}`
|
||||
|
||||
- Unload the filter from an interface:
|
||||
|
||||
`sudo xdp-filter unload {{network_interface}}`
|
||||
|
||||
- Deny traffic to a specific destination port:
|
||||
|
||||
`sudo xdp-filter port {{destination_port}}`
|
||||
|
||||
- Deny traffic from a specific source IP address:
|
||||
|
||||
`sudo xdp-filter ip {{[-m|--mode]}} src {{source_ip}}`
|
||||
|
||||
- Deny traffic from a specific source MAC address:
|
||||
|
||||
`sudo xdp-filter ether {{[-m|--mode]}} src {{mac_address}}`
|
||||
|
||||
- Poll packets and show statistics every 10000 milliseconds:
|
||||
|
||||
`sudo xdp-filter poll {{[-i|--interval]}} 10000`
|
||||
Reference in New Issue
Block a user