mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-11 20:47:34 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/linux/systemctl-list-machines
Normal file
25
tldr/linux/systemctl-list-machines
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl list-machines
|
||||
|
||||
> List the host and all running local virtual machines or containers with their state.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#list-machines%20PATTERN%E2%80%A6>.
|
||||
|
||||
- Show all machines (host and running containers/VMs):
|
||||
|
||||
`systemctl list-machines`
|
||||
|
||||
- List a specific machine:
|
||||
|
||||
`systemctl list-machines {{machine}}`
|
||||
|
||||
- List multiple matching machines:
|
||||
|
||||
`systemctl list-machines {{machine_1 machine_2 ...}}`
|
||||
|
||||
- Filter machines using wildcard patterns ie, `shell-globbing`:
|
||||
|
||||
`systemctl list-machines {{pattern}}`
|
||||
33
tldr/linux/systemctl-list-paths
Normal file
33
tldr/linux/systemctl-list-paths
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl list-paths
|
||||
|
||||
> List path units currently in memory, ordered by path.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#list-paths%20PATTERN%E2%80%A6>.
|
||||
|
||||
- Show all path units currently in memory:
|
||||
|
||||
`systemctl list-paths`
|
||||
|
||||
- List path units matching specific wildcard pattern ie, `shell-globbing`:
|
||||
|
||||
`systemctl list-paths {{pattern}}`
|
||||
|
||||
- List path units that match with multiple patterns:
|
||||
|
||||
`systemctl list-paths {{pattern_1 pattern_2 ...}}`
|
||||
|
||||
- Show all path units, including inactive ones:
|
||||
|
||||
`systemctl list-paths --all`
|
||||
|
||||
- Filter path units by state:
|
||||
|
||||
`systemctl list-paths --state {{state}}`
|
||||
|
||||
- Also show unit types in the output:
|
||||
|
||||
`systemctl list-paths --show-types`
|
||||
@@ -37,6 +37,6 @@ uclei-templates` on Windows):
|
||||
|
||||
`nuclei {{[-t|-templates]}} {{path/to/nuclei-templates/http}} {{[-u|-target]}} {{https://example.com}} {{[-v|-verbose]}} {{[-o|-output]}} {{path/to/results}}`
|
||||
|
||||
- Run a scan based on one or more template conditions:
|
||||
- Use an AI prompt to dynamically generate a template to scan a target (projectdiscovery cloud pdcp API key needs to be configured using `nuclei -auth`):
|
||||
|
||||
`nuclei {{[-tc|-template-condition]}} "{{contains(tags, 'xss') && contains(tags, 'cve')}}" {{[-u|-target]}} {{https://example.com}}`
|
||||
`nuclei {{[-u|-target]}} {{https://example.com}} {{[-ai|-prompt]}} "{{find admin login endpoints}}"`
|
||||
|
||||
20
tldr/osx/cut
20
tldr/osx/cut
@@ -8,14 +8,22 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Cut out fields from `stdin` or files.
|
||||
> More information: <https://keith.github.io/xcode-man-pages/cut.1.html>.
|
||||
|
||||
- Print a specific character/field range of each line:
|
||||
- Print the fifth [c]haracter on each line:
|
||||
|
||||
`{{command}} | cut -{{c|f}} {{1|1,10|1-10|1-|-10}}`
|
||||
`{{command}} | cut -c 5`
|
||||
|
||||
- Print a field range of each line with a specific delimiter:
|
||||
- Print the fifth to tenth [c]haracter of each line of the specified file:
|
||||
|
||||
`{{command}} | cut -d "{{,}}" -f {{1}}`
|
||||
`cut -c 5-10 {{path/to/file}}`
|
||||
|
||||
- Print a character range of each line of a specific file:
|
||||
- Split each line in a file by a delimiter into fields and print [f]ields two and six (default delimiter is `TAB`):
|
||||
|
||||
`cut -c {{1}} {{path/to/file}}`
|
||||
`cut -f 2,6 {{path/to/file}}`
|
||||
|
||||
- Split each line by the specified [d]elimiter and print all from the second [f]ield onward:
|
||||
|
||||
`{{command}} | cut -d "{{delimiter}}" -f 2-`
|
||||
|
||||
- Use space as a [d]elimiter and print only the first 3 [f]ields:
|
||||
|
||||
`{{command}} | cut -d " " -f -3`
|
||||
|
||||
Reference in New Issue
Block a user