Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-13 00:20:52 +00:00
parent c8f7023029
commit 1111290472
20 changed files with 504 additions and 1 deletions

12
tldr/brew-abv Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# brew abv
> This command is an alias of `brew info`.
- View documentation for the original command:
`tldr brew info`

33
tldr/brew-info Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# brew info
> Display information for Homebrew installation and formulae.
> More information: <https://docs.brew.sh/Manpage#info-abv-options-formulacask->.
- Display statistics for Homebrew installation:
`brew info`
- Display more information about a formula or cask:
`brew info {{formula|cask}}`
- Display verbose information about a formula or cask:
`brew info {{[-v|--verbose]}} {{formula|cask}}`
- Display information about a formula or cask in JSON format:
`brew info --json {{formula|cask}}`
- Print JSON of currently installed formulae:
`brew info --json --installed`
- Display help:
`brew info {{[-h|--help]}}`

29
tldr/cluster Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# cluster
> Find clusters in a graph and augment the graph with this information.
> More information: <https://graphviz.org/pdf/cluster.1.pdf>.
- Generate clusters that optimize modularity and print the result to `stdout`:
`cluster {{input.gv}}`
- Specify a target number of [C]lusters (approximate) to generate (0 by default, meaning a number that approximately optimizes the modularity):
`cluster -C {{5}} {{input.gv}}`
- Use a different [c]lustering method (0: modularity clustering, 1: modularity quality):
`cluster -c {{0|1}} {{input.gv}}`
- Save the [o]utput to a file:
`cluster -o {{output.gv}} {{input.gv}}`
- Enable [v]erbose mode:
`cluster -v {{input.gv}}`

13
tldr/diffimg Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# diffimg
> Generate an image where each pixel is the difference between corresponding pixels in the 2 source images.
> More information: <https://graphviz.org/pdf/diffimg.1.pdf>.
- Compare two images and output the difference image to the specified file:
`diffimg {{path/to/image1}} {{path/to/image2}} {{path/to/output_image}}`

25
tldr/dijkstra Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# dijkstra
> Compute shortest-path distances from a single source node in a graph.
> More information: <https://graphviz.org/pdf/dijkstra.1.pdf>.
- Compute distances from a given source node in a graph file:
`dijkstra {{source_node_file}}`
- Treat the graph as [d]irected when computing distances:
`dijkstra -d {{source_node_file}}`
- Record the [p]revious closest node for each node on the shortest path:
`dijkstra -p {{source_node_file}}`
- [a]ssign large distance values to unreachable nodes:
`dijkstra -a {{source_node_file}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# CD
> Change the current working directory.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-cd>.
> More information: <https://www.dosbox.com/wiki/Commands#CD_.28Change_Directory.29>.
- Go to the specified directory:

26
tldr/dotty Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# dotty
> A customizable interactive graph editor for the X Window System.
> Note: This tool has been deprecated, but this entry is retained to aid anyone still using it.
> More information: <https://graphviz.org/pdf/dotty.1.pdf>.
- Open a graph file (`.gv` or `.dot`) in the Dotty editor:
`dotty {{path/to/graph.gv}}`
- Start Dotty with the [V]ersion information displayed:
`dotty -V`
- Set the [l]ayout [m]ode to synchronous or asynchronous:
`dotty -lm {{sync|async}} {{path/to/graph.gv}}`
- Set the m[e]ssage verbosity [l]evel (`0` for minimal, `1` for detailed):
`dotty -el {{0|1}} {{path/to/graph.gv}}`

12
tldr/gh-at Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gh at
> This command is an alias of `gh attestation`.
- View documentation for the original command:
`tldr gh attestation`

37
tldr/gh-attestation Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gh attestation
> Download and verify artifact attestations to ensure their integrity and provenance.
> More information: <https://cli.github.com/manual/gh_attestation>.
- Download attestations for a local file associated with a specific repository:
`gh {{[at|attestation]}} download {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repo}}`
- Download attestations for an OCI container image associated with an organization:
`gh {{[at|attestation]}} download oci://{{image_uri}} {{[-o|--owner]}} {{organization_name}}`
- Verify a local artifact online against attestations from a specific repository:
`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repo}}`
- Verify an artifact, requiring it was signed by a specific reusable workflow for enhanced security:
`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-o|--owner]}} {{organization_name}} --signer-workflow {{owner}}/{{repo}}/{{path/to/workflow.yml}}`
- Verify an artifact and output the detailed verification results as JSON for use in policy engines:
`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-o|--owner]}} {{organization_name}} --format json`
- Perform a fully offline verification using a downloaded bundle and a custom trusted root file:
`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-b|--bundle]}} {{path/to/bundle.jsonl}} --custom-trusted-root {{path/to/trusted_root.jsonl}}`
- Save the trusted root of signing certificates to a file for offline verification:
`gh {{[at|attestation]}} trusted-root > {{path/to/trusted_root.jsonl}}`

12
tldr/gh-rs Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gh rs
> This command is an alias of `gh ruleset`.
- View documentation for the original command:
`tldr gh ruleset`

41
tldr/gh-ruleset Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gh ruleset
> Manage GitHub repository rulesets.
> More information: <https://cli.github.com/manual/gh_ruleset>.
- List all rulesets for the current repository:
`gh {{[rs|ruleset]}} {{[ls|list]}}`
- List all rulesets for a specific organization:
`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-o|--org]}} {{organization_name}}`
- Check the rules that apply to the current branch:
`gh {{[rs|ruleset]}} check`
- Check the rules that apply to a specific branch in another repository:
`gh {{[rs|ruleset]}} check {{branch_name}} {{[-R|--repo]}} {{owner}}/{{repo}}`
- Interactively select and view a ruleset for the current repository:
`gh {{[rs|ruleset]}} view`
- View a specific ruleset by its ID:
`gh {{[rs|ruleset]}} view {{ruleset_id}}`
- View an organization-level ruleset by its ID:
`gh {{[rs|ruleset]}} view {{ruleset_id}} {{[-o|--org]}} {{organization_name}}`
- Open the list of rulesets for a specific repository in the browser:
`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repo}} {{[-w|--web]}}`

25
tldr/gvedit Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gvedit
> Simple Graphviz graph editor and viewer.
> More information: <https://graphviz.org/pdf/gvedit.1.pdf>.
- Open a Graphviz file in the editor:
`gvedit {{path/to/graph.gv}}`
- [s]cale coordinates from points to inches (useful for layouts generated by Graphviz tools):
`gvedit -s {{path/to/graph.gv}}`
- Enable [v]erbose mode:
`gvedit -v {{path/to/graph.gv}}`
- Display help:
`gvedit -?`

37
tldr/gvgen Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gvgen
> Generate simple, structured abstract graphs.
> More information: <https://graphviz.org/pdf/gvgen.1.pdf>.
- Generate a [c]ycle with 10 vertices and edges and write it to `stdout`:
`gvgen -c {{10}}`
- Generate a 4×3 [g]rid:
`gvgen -g {{4,3}}`
- Generate a binary [t]ree of height 5:
`gvgen -t {{5}}`
- Generate a complete [b]ipartite graph with 3 and 4 vertices:
`gvgen -b {{3,4}}`
- Create a [r]andom graph and [o]utput it to a file:
`gvgen -r {{10,5}} -o {{random.gv}}`
- Generate a [d]irected graph with [v]erbose output:
`gvgen -d -v -c {{6}}`
- Display help:
`gvgen -?`

33
tldr/gvmap Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gvmap
> Find clusters and creates a geographical map highlighting clusters.
> More information: <https://graphviz.org/pdf/gvmap.1.pdf>.
- Generate a clustered map layout from a DOT format graph:
`gvmap {{graph.gv}} -o {{output.xdot}}`
- Generate a map using existing cluster subgraphs from the input:
`gvmap -D {{graph.gv}}`
- Include graph edges in the [o]utput map:
`gvmap -e {{graph.gv}} -o {{output.xdot}}`
- Specify a [c]olor scheme (1: pastel, 2: blue-yellow, 3: white-red, etc.):
`gvmap -c {{1|2|3|...}} {{graph.gv}} -o {{output.xdot}}`
- Set the maximum number of [C]lusters (by default 0, meaning there is no limit):
`gvmap -C {{10}} {{graph.gv}} -o {{output.xdot}}`
- Only draw cluster 2 (by default, all clusters are drawn):
`gvmap -highlight={{2}} {{graph.gv}} -o {{output.xdot}}`

29
tldr/kubectl-attach Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kubectl attach
> Attach to a process that is already running inside an existing container.
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_attach/>.
- Get output from a pod:
`kubectl attach {{pod_name}}`
- Get output from a container in the specified pod:
`kubectl attach {{pod_name}} {{[-c|--container]}} {{container_name}}`
- Get output from the first pod of a replica set:
`kubectl attach {{[rs|replicaset]}}/{{replicaset_name}}`
- Create an interactive session with a pod:
`kubectl attach {{pod_name}} {{[-it|--stdin --tty]}}`
- Create an interactive session with a specific container from a pod:
`kubectl attach {{pod_name}} {{[-c|--container]}} {{container_name}} {{[-it|--stdin --tty]}}`

37
tldr/linux/pvck Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pvck
> Check and repair LVM metadata on physical volumes.
> More information: <https://manned.org/pvck>.
- Print LVM on-disk headers and structures (label, PV header, MDA header, metadata area):
`pvck {{/dev/sdXN}} --dump headers`
- Print the current VG metadata text:
`pvck {{/dev/sdXN}} --dump metadata`
- List all metadata versions found in the metadata area:
`pvck {{/dev/sdXN}} --dump metadata_all`
- Search common locations for metadata when headers may be damaged, and save it to a file:
`pvck {{/dev/sdXN}} --dump metadata_search {{[-f|--file]}} {{path/to/metadata.txt}}`
- Select the second metadata area (mda2) when printing metadata:
`pvck {{/dev/sdXN}} --dump metadata --settings "mda_num=2"`
- Repair headers and metadata using a metadata input file (use with care):
`pvck {{/dev/sdXN}} --repair {{[-f|--file]}} {{path/to/metadata_file}}`
- Repair only the PV header and label header:
`pvck {{/dev/sdXN}} --repairtype pv_header`

25
tldr/linux/pw-jack Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pw-jack
> Run a JACK application with PipeWire.
> More information: <https://docs.pipewire.org/page_man_pw-jack_1.html>.
- Run a command with its arguments, using PipeWire:
`pw-jack {{command}} {{argument1 argument2 ...}}`
- Run a command in verbose mode:
`pw-jack -v {{command}}`
- Connect to a specific remote PipeWire instance:
`pw-jack -r {{remote_instance_name}} {{command}}`
- Display help:
`pw-jack -h`

34
tldr/linux/semanage-login Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# semanage-login
> Manage SELinux login mappings between Linux users and SELinux users.
> See also: `semanage`, `semanage-user`.
> More information: <https://manned.org/semanage-login>.
- List all login mappings:
`sudo semanage login {{[-l|--list]}}`
- Add a login mapping (map Linux user to SELinux user):
`sudo semanage login {{[-a|--add]}} {{[-s|--seuser]}} {{selinux_user}} {{linux_username}}`
- Delete a login mapping:
`sudo semanage login {{[-d|--delete]}} {{linux_username}}`
- Modify an existing login mapping:
`sudo semanage login {{[-m|--modify]}} {{[-s|--seuser]}} {{selinux_user}} {{linux_username}}`
- Add a login mapping with a specific MLS/MCS range:
`sudo semanage login {{[-a|--add]}} {{[-s|--seuser]}} {{user_u}} {{[-r|--range]}} {{s0-s0:c0.c1023}} {{linux_username}}`
- List only customized login mappings:
`sudo semanage login {{[-l|--list]}} {{[-C|--locallist]}}`

View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl list-automounts
> List automount units currently in memory, showing mount paths and unit names.
> See also: `systemctl list-units`, `systemctl list-unit-files`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#list-automounts%20PATTERN%E2%80%A6>.
- List automount units currently in memory:
`systemctl list-automounts`
- List all automount units, including inactive ones:
`systemctl list-automounts {{[-a|--all]}}`
- Filter automount units by state:
`systemctl list-automounts --state {{active|inactive|failed|...}}`
- Filter automount units by name pattern:
`systemctl list-automounts {{pattern1 pattern2 ...}}`

17
tldr/mvn-archetype Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# mvn archetype
> Generate a new Maven project from a predefined template (archetype).
> More information: <https://maven.apache.org/archetype/maven-archetype-plugin/usage.html>.
- Generate a new project interactively:
`mvn archetype:generate`
- Generate a project non-interactively with specific archetype and project parameters:
`mvn archetype:generate --define archetypeGroupId={{group_id}} --define archetypeArtifactId={{artifact_id}} --define archetypeVersion={{version}} --define groupId={{project_group_id}} --define artifactId={{project_name}} --define interactiveMode=false`