mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-09 19:57:59 +00:00
Update cheatsheets
This commit is contained in:
27
tldr/float
Normal file
27
tldr/float
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# float
|
||||
|
||||
> Declare floating point variable(s).
|
||||
> Equivalent to `typeset -E` except that options irrelevant to floating point numbers are not permitted.
|
||||
> See also: `typeset`, `declare`.
|
||||
> More information: <https://manned.org/zshbuiltins>.
|
||||
|
||||
- Declare a floating point variable:
|
||||
|
||||
`float {{variable_name}}`
|
||||
|
||||
- Declare a floating point variable while assigning its value:
|
||||
|
||||
`float {{variable_name}}={{value}}`
|
||||
|
||||
- Declare multiple floating point variables:
|
||||
|
||||
`float {{var1=value1 var2=value2 ...}}`
|
||||
|
||||
- Display defined variables:
|
||||
|
||||
`float`
|
||||
@@ -9,18 +9,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `dmesg`.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/journalctl.html>.
|
||||
|
||||
- Show all messages with priority level 3 (errors) from this boot:
|
||||
|
||||
`journalctl {{[-b|--boot]}} {{[-p|--priority]}} 3`
|
||||
|
||||
- Delete journal logs which are older than 2 days:
|
||||
|
||||
`journalctl --vacuum-time 2d`
|
||||
|
||||
- Show only the last `n` lines and follow new messages (like `tail -f` for traditional syslog):
|
||||
- Show the latest `n` lines and follow new messages (like `tail --follow` for traditional syslog):
|
||||
|
||||
`journalctl {{[-n|--lines]}} {{n}} {{[-f|--follow]}}`
|
||||
|
||||
- Show all messages with priority level 3 (errors) from the boot before last shutdown:
|
||||
|
||||
`journalctl {{[-b|--boot]}} -1 {{[-p|--priority]}} 3`
|
||||
|
||||
- Show all messages by a specific unit:
|
||||
|
||||
`journalctl {{[-u|--unit]}} {{unit}}`
|
||||
@@ -31,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Filter messages within a time range (either timestamp or placeholders like "yesterday"):
|
||||
|
||||
`journalctl {{[-S|--since]}} {{now|today|yesterday|tomorrow}} {{[-U|--until]}} "{{YYYY-MM-DD HH:MM:SS}}"`
|
||||
`journalctl {{[-S|--since]}} {{now|today|yesterday|tomorrow|...}} {{[-U|--until]}} "{{YYYY-MM-DD HH:MM:SS}}"`
|
||||
|
||||
- Show all messages by a specific process:
|
||||
|
||||
@@ -40,3 +36,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Show all messages by a specific executable:
|
||||
|
||||
`journalctl {{path/to/executable}}`
|
||||
|
||||
- Delete journal logs which are older than 2 days:
|
||||
|
||||
`journalctl --vacuum-time 2d`
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Upgrade one or more specific package(s):
|
||||
|
||||
`opkg upgrade {{package(s)}}`
|
||||
`opkg upgrade {{package1 package2 ...}}`
|
||||
|
||||
- Display information for a specific package:
|
||||
|
||||
|
||||
38
tldr/windows/ping
Normal file
38
tldr/windows/ping
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ping
|
||||
|
||||
> Send ICMP ECHO_REQUEST packets to network hosts.
|
||||
> Unlike Unix-like systems, Windows `ping` sends only 4 packets by default.
|
||||
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/ping>.
|
||||
|
||||
- Ping a host 4 times:
|
||||
|
||||
`ping {{host}}`
|
||||
|
||||
- Ping a host a specific number of times:
|
||||
|
||||
`ping -n {{count}} {{host}}`
|
||||
|
||||
- Ping a host continuously (until stopped with `<Ctrl c>`):
|
||||
|
||||
`ping -t {{host}}`
|
||||
|
||||
- Set the timeout in milliseconds to wait for each reply:
|
||||
|
||||
`ping -w {{milliseconds}} {{host}}`
|
||||
|
||||
- Set the buffer size of the ping packet in bytes:
|
||||
|
||||
`ping -l {{bytes}} {{host}}`
|
||||
|
||||
- Ping a host using a specific source IP address:
|
||||
|
||||
`ping -S {{source_ip}} {{host}}`
|
||||
|
||||
- Resolve address to hostname:
|
||||
|
||||
`ping -a {{host}}`
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ping {{host}} | x ping vis {{[-m|--heatmap]}}`
|
||||
|
||||
- Show help:
|
||||
- Display help:
|
||||
|
||||
`x ping {{[-h|--help]}}`
|
||||
|
||||
Reference in New Issue
Block a user