diff --git a/tldr/float b/tldr/float new file mode 100644 index 00000000..ab1e6e0d --- /dev/null +++ b/tldr/float @@ -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: . + +- 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` diff --git a/tldr/linux/journalctl b/tldr/linux/journalctl index 817142d3..5eb5eb77 100644 --- a/tldr/linux/journalctl +++ b/tldr/linux/journalctl @@ -9,18 +9,14 @@ source: https://github.com/tldr-pages/tldr.git > See also: `dmesg`. > More information: . -- 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` diff --git a/tldr/linux/opkg b/tldr/linux/opkg index d137579a..ec3df5ed 100644 --- a/tldr/linux/opkg +++ b/tldr/linux/opkg @@ -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: diff --git a/tldr/windows/ping b/tldr/windows/ping new file mode 100644 index 00000000..3015469f --- /dev/null +++ b/tldr/windows/ping @@ -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: . + +- 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 ``): + +`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}}` diff --git a/tldr/x-ping b/tldr/x-ping index 78927dbb..3e8fc9b8 100644 --- a/tldr/x-ping +++ b/tldr/x-ping @@ -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]}}`