mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Search for a pattern in all files recursively in a directory, showing line numbers of matches, ignoring binary files:
|
||||
|
||||
`grep {{[-r|--recursive]}} {{[-n|--line-number]}} --binary-files {{without-match}} "{{search_pattern}}" {{path/to/directory}}`
|
||||
`grep {{[-r|--recursive]}} {{[-n|--line-number]}} {{[-I|--binary-files=without-match]}} "{{search_pattern}}" {{path/to/directory}}`
|
||||
|
||||
- Use extended regular expressions (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:
|
||||
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- List all partitions in a table, including current mountpoints:
|
||||
|
||||
`sudo blkid {{[-o|--output]}} list`
|
||||
|
||||
- Get the UUID of the filesystem on a partition:
|
||||
|
||||
`blkid {{[-s|--match-tag]}} UUID {{[-o|--output]}} value {{/dev/sdXY}}`
|
||||
|
||||
34
tldr/linux/chmem
Normal file
34
tldr/linux/chmem
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# chmem
|
||||
|
||||
> Modify the state of memory blocks (online or offline) in a Linux system.
|
||||
> Typically used in virtualized environments to manage memory hotplug.
|
||||
> More information: <https://manned.org/chmem>.
|
||||
|
||||
- Set a memory block offline:
|
||||
|
||||
`sudo chmem {{[-b|--block]}} {{[-d|--disable]}} {{block_number}}`
|
||||
|
||||
- Set a memory block online:
|
||||
|
||||
`sudo chmem {{[-b|--block]}} {{[-e|--enable]}} {{block_number}}`
|
||||
|
||||
- Set a memory range offline using hexadecimal addresses:
|
||||
|
||||
`sudo chmem {{[-d|--disable]}} 0x{{start_address}}-0x{{end_address}}`
|
||||
|
||||
- Set a memory range online using hexadecimal addresses:
|
||||
|
||||
`sudo chmem {{[-e|--enable]}} 0x{{start_address}}-0x{{end_address}}`
|
||||
|
||||
- Set memory online and assign it to a specific zone (e.g., Movable):
|
||||
|
||||
`sudo chmem {{[-e|--enable]}} 0x{{start_address}} {{[-z|--zone]}} {{Movable}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`chmem {{[-h|--help]}}`
|
||||
33
tldr/pokeget
Normal file
33
tldr/pokeget
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pokeget
|
||||
|
||||
> Display sprites of Pokemon in your terminal.
|
||||
> More information: <https://github.com/talwat/pokeget-rs>.
|
||||
|
||||
- Print a sprite of a given pokemon:
|
||||
|
||||
`pokeget {{pokemon_name}}`
|
||||
|
||||
- Print Mr. Mime (note the use of `-` instead of spaces):
|
||||
|
||||
`pokeget mr-mime`
|
||||
|
||||
- Print Mega Gengar:
|
||||
|
||||
`pokeget gengar {{[-m|--mega]}}`
|
||||
|
||||
- Print a random shiny Pokemon:
|
||||
|
||||
`pokeget random {{[-s|--shiny]}}`
|
||||
|
||||
- Print Alolan Meowth, without printing the Pokemon's name:
|
||||
|
||||
`pokeget meowth {{[-a|--alolan]}} --hide-name`
|
||||
|
||||
- Print a random Pokemon with 1/4096 chance to be shiny:
|
||||
|
||||
`((RANDOM%4096 == 0)) && pokeget random --shiny || pokeget random`
|
||||
@@ -12,6 +12,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`progress`
|
||||
|
||||
- Monitor all running coreutils:
|
||||
|
||||
`progress {{[-m|--monitor]}}`
|
||||
|
||||
- Show the progress of running coreutils in quiet mode:
|
||||
|
||||
`progress {{[-q|--quiet]}}`
|
||||
|
||||
12
tldr/pulumi-down
Normal file
12
tldr/pulumi-down
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pulumi down
|
||||
|
||||
> This command is an alias of `pulumi destroy`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr pulumi destroy`
|
||||
@@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Measure how long a command took to run.
|
||||
> Note: `time` can either exist as a shell builtin, a standalone program or both.
|
||||
> See also: `times`.
|
||||
> More information: <https://manned.org/time>.
|
||||
|
||||
- Run the `command` and print the time measurements to `stdout`:
|
||||
|
||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# times
|
||||
|
||||
> Print the cumulative CPU usage time of the current shell.
|
||||
> See also: `time`.
|
||||
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-times>.
|
||||
|
||||
- Print CPU usage. First line is current shell CPU usage for User and System. Second is all child processes:
|
||||
|
||||
Reference in New Issue
Block a user