Update cheatsheets

This commit is contained in:
ivuorinen
2025-06-13 00:20:43 +00:00
parent 7597be12db
commit d60c0b1b4b
15 changed files with 55 additions and 43 deletions

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> DNS lookup utility.
> It has colorful output, supports DNS-over-TLS and DNS-over-HTTPS protocols, and can emit JSON.
> More information: <https://dns.lookup.dog>.
> More information: <https://github.com/ogham/dog#examples>.
- Lookup the IP(s) associated with a hostname (A records):
@@ -23,12 +23,12 @@ source: https://github.com/tldr-pages/tldr.git
- Query over TCP rather than UDP:
`dog {{example.com}} MX @{{1.1.1.1}} --tcp`
`dog {{example.com}} MX @{{1.1.1.1}} {{[-T|--tcp]}}`
- Query the MX records type associated with a given domain name over TCP using explicit arguments:
`dog --query {{example.com}} --type MX --nameserver {{1.1.1.1}} --tcp`
`dog {{[-q|--query]}} {{example.com}} {{[-t|--type]}} MX {{[-n|--nameserver]}} {{1.1.1.1}} {{[-T|--tcp]}}`
- Lookup the IP(s) associated with a hostname (A records) using DNS over HTTPS (DoH):
`dog {{example.com}} --https @{{https://cloudflare-dns.com/dns-query}}`
`dog {{example.com}} {{[-H|--https]}} @{{https://cloudflare-dns.com/dns-query}}`

View File

@@ -6,35 +6,35 @@ source: https://github.com/tldr-pages/tldr.git
# exa
> A modern replacement for `ls` (List directory contents).
> More information: <https://github.com/ogham/exa>.
> More information: <https://github.com/ogham/exa#command-line-options>.
- List files one per line:
`exa --oneline`
`exa {{[-1|--oneline]}}`
- List all files, including hidden files:
`exa --all`
`exa {{[-a|--all]}}`
- Long format list (permissions, ownership, size and modification date) of all files:
`exa --long --all`
`exa {{[-l|--long]}} {{[-a|--all]}}`
- List files with the largest at the top:
`exa --reverse --sort={{size}}`
`exa {{[-r|--reverse]}} {{[-s|--sort]}} {{size}}`
- Display a tree of files, three levels deep:
`exa --long --tree --level={{3}}`
`exa {{[-l|--long]}} {[[-T|--tree]}} {{[-L|--level]}} {{3}}`
- List files sorted by modification date (oldest first):
`exa --long --sort={{modified}}`
`exa {{[-l|--long]}} {{[-s|--sort]}} {{modified}}`
- List files with their headers, icons, and Git statuses:
`exa --long --header --icons --git`
`exa {{[-l|--long]}} {{[-h|--header]}} --icons --git`
- Don't list files mentioned in `.gitignore`:

View File

@@ -7,36 +7,36 @@ source: https://github.com/tldr-pages/tldr.git
> An open-source framework for augmenting humans using AI.
> Provides a modular framework for solving specific problems using a crowdsourced set of AI prompts.
> More information: <https://github.com/danielmiessler/fabric>.
> More information: <https://github.com/danielmiessler/fabric#usage>.
- Run the setup to configure fabric:
`fabric --setup`
`fabric {{[-S|--setup]}}`
- List all available patterns:
`fabric --listpatterns`
`fabric {{[-l|--listpatterns]}}`
- Run a pattern with input from a file:
`fabric --pattern {{pattern_name}} < {{path/to/input_file}}`
`fabric {{[-p|--pattern]}} {{pattern_name}} < {{path/to/input_file}}`
- Run a pattern on a YouTube video URL:
`fabric --youtube "{{https://www.youtube.com/watch?v=video_id}}" --pattern {{pattern_name}}`
`fabric {{[-y|--youtube]}} "{{https://www.youtube.com/watch?v=video_id}}" {{[-p|--pattern]}} {{pattern_name}}`
- Chain patterns together by piping output from one to another:
`fabric --pattern {{pattern1}} | fabric --pattern {{pattern2}}`
`fabric {{[-p|--pattern]}} {{pattern1}} | fabric {{[-p|--pattern]}} {{pattern2}}`
- Run a custom user-defined pattern:
`fabric --pattern {{custom_pattern_name}}`
`fabric {{[-p|--pattern]}} {{custom_pattern_name}}`
- Run a pattern and save the output to a file:
`fabric --pattern {{pattern_name}} --output {{path/to/output_file}}`
`fabric {{[-p|--pattern]}} {{pattern_name}} {{[-o|--output]}} {{path/to/output_file}}`
- Run a pattern with the specified variables:
`fabric --pattern {{pattern_name}} --variable "{{variable_name}}:{{value}}"`
`fabric {{[-p|--pattern]}} {{pattern_name}} {{[-v|--variable]}} "{{variable_name}}:{{value}}"`

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> An alternative to `find`.
> Aims to be faster and easier to use than `find`.
> More information: <https://github.com/sharkdp/fd>.
> More information: <https://github.com/sharkdp/fd#how-to-use>.
- Recursively find files matching a specific pattern in the current directory:
@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Find files with a specific extension:
`fd --extension {{txt}}`
`fd {{[-e|--extension]}} {{txt}}`
- Find files in a specific directory:
@@ -27,8 +27,8 @@ source: https://github.com/tldr-pages/tldr.git
- Include ignored and hidden files in the search:
`fd --hidden --no-ignore "{{string|regex}}"`
`fd {{[-H|--hidden]}} {{[-I|--no-ignore]}} "{{string|regex}}"`
- Execute a command on each search result returned:
`fd "{{string|regex}}" --exec {{command}}`
`fd "{{string|regex}}" {{[-x|--exec]}} {{command}}`

View File

@@ -19,16 +19,16 @@ source: https://github.com/tldr-pages/tldr.git
- Select multiple files with `<Shift Tab>` and write to a file:
`find {{path/to/directory}} -type f | fzf --multi > {{path/to/file}}`
`find {{path/to/directory}} -type f | fzf {{[-m|--multi]}} > {{path/to/file}}`
- Start `fzf` with a specified query:
`fzf --query "{{query}}"`
`fzf {{[-q|--query]}} "{{query}}"`
- Start `fzf` on entries that start with core and end with either go, rb, or py:
`fzf --query "^core go$ | rb$ | py$"`
`fzf {{[-q|--query]}} "^core go$ | rb$ | py$"`
- Start `fzf` on entries that not match pyc and match exactly travis:
`fzf --query "!pyc 'travis"`
`fzf {{[-q|--query]}} "!pyc 'travis"`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# intercept
> Read raw input events from a specified input event device and redirect it to stdout.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master?ref_type=heads#intercept>.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master#intercept>.
- Read and output raw input events from a given input device file (the system will not see any key presses):

View File

@@ -31,3 +31,7 @@ source: https://github.com/tldr-pages/tldr.git
- Create an empty temporary directory and print its absolute path:
`mktemp {{[-d|--directory]}}`
- Print the name of a temporary file or directory without actually creating it:
`mktemp {{[-u|--dry-run]}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mux
> Intercept and multiplex streams of input events.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master?ref_type=heads#mux>.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master#mux>.
- Create a new muxer with a specified name:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Intercept and monitor input devices for launching tasks.
> Filters or modifies events according to configuration file(s) (default: `/etc/interception/udevmon.d/*.yaml`).
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master?ref_type=heads#udevmon>.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master#udevmon>.
- Start udevmon with specified configuration file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# uinput
> Intercept and write input events to a virtual keyboard device using /dev/uinput.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master?ref_type=heads#uinput>.
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master#uinput>.
- Show resulting YAML device description merge and exit (dry-run):

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Mobile Shell (`mosh`) is a robust and responsive replacement for SSH.
> `mosh` persists connections to remote servers while roaming between networks.
> More information: <https://mosh.org>.
> More information: <https://manned.org/mosh>.
- Connect to a remote server:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mtr
> Matt's Traceroute: combined traceroute and ping tool.
> More information: <https://www.bitwizard.nl/mtr/>.
> More information: <https://manned.org/mtr>.
- Traceroute to a host and continuously ping all intermediary hops:
@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Disable IP address and host name mapping:
`mtr --no-dns {{example.com}}`
`mtr {{[-n|--no-dns]}} {{example.com}}`
- Generate output after pinging each hop 10 times:
`mtr --report-wide {{example.com}}`
`mtr {{[-w|--report-wide]}} {{example.com}}`
- Force IP IPv4 or IPV6:
@@ -26,12 +26,12 @@ source: https://github.com/tldr-pages/tldr.git
- Wait for a given time (in seconds) before sending another packet to the same hop:
`mtr --interval {{10}} {{example.com}}`
`mtr {{[-i|--interval]}} {{10}} {{example.com}}`
- Display the Autonomous System Number (ASN) for each hop:
`mtr --aslookup {{example.com}}`
`mtr {{[-z|--aslookup]}} {{example.com}}`
- Display both IP address and reverse DNS name:
`mtr --show-ips {{example.com}}`
`mtr {{[-b|--show-ips]}} {{example.com}}`

View File

@@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git
- Change the configuration directory:
`ranger --confdir={{path/to/directory}}`
`ranger {{[-r|--confdir]}} {{path/to/directory}}`
- Change the data directory:
`ranger --datadir={{path/to/directory}}`
`ranger --datadir {{path/to/directory}}`
- Print CPU usage statistics on exit:

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Overwrite a file and remove it:
`shred --remove {{path/to/file}}`
`shred {{[-u|--remove]}} {{path/to/file}}`
- Overwrite a file 100 times, add a final overwrite with zeros, remove the file after overwriting it and show verbose progress on the screen:

View File

@@ -15,3 +15,11 @@ source: https://github.com/tldr-pages/tldr.git
- Flush all pending write operations on a single file to disk:
`sync {{path/to/file}}`
- Flush writes and drop file system caches (Linux only):
`sync; echo 3 | sudo tee /proc/sys/vm/drop_caches`
- Flush disk writes and attempts to clear inactive memory and filesystem caches (macOS only):
`sync; sudo purge`