From 4e6886aa1f3a3eea7f97fa66c7ca8ac00eec07c4 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 23 Dec 2025 00:21:40 +0000 Subject: [PATCH] Update cheatsheets --- tldr/3d-ascii-viewer | 33 ++++++++++++++++++++++++++ tldr/android/pkg | 22 ++++++++++++++---- tldr/bash | 2 +- tldr/diff-so-fancy | 17 ++++++++++++++ tldr/evil-winrm | 8 +++---- tldr/gh-attestation | 6 ++--- tldr/gh-ruleset | 4 ++-- tldr/gofumpt | 38 ++++++++++++++++++++++++++++++ tldr/grep | 1 + tldr/hub-delete | 2 +- tldr/ippeveprinter | 1 - tldr/kubectl-completion | 41 +++++++++++++++++++++++++++++++++ tldr/linux/beet | 29 +++++++++++++++++++++++ tldr/linux/braa | 4 ++-- tldr/linux/dockerd | 2 +- tldr/linux/fail2ban-client | 2 +- tldr/linux/ip | 4 ++-- tldr/linux/ip-route-add | 2 +- tldr/linux/iptables | 4 ++-- tldr/linux/qm-cloudinit | 24 ++++--------------- tldr/linux/qm-disk | 12 ++++++++++ tldr/linux/qm-guest | 16 +++++++++++++ tldr/linux/rpcclient | 8 +++---- tldr/linux/startx | 2 +- tldr/linux/torsocks | 2 +- tldr/linux/xdg-user-dirs-update | 6 ++--- tldr/mcat | 37 +++++++++++++++++++++++++++++ tldr/ncmpcpp | 2 +- tldr/nix-run | 8 +++---- tldr/npm-cache | 20 +++++++--------- tldr/odpscmd-auth | 2 +- tldr/odpscmd-func | 2 +- tldr/odpscmd-inst | 2 +- tldr/odpscmd-resource | 2 +- tldr/odpscmd-table | 2 +- tldr/odpscmd-tunnel | 2 +- tldr/osx/csrutil | 2 +- tldr/pkgz | 4 ++++ tldr/podman-image | 2 +- tldr/qdbus | 2 +- tldr/rbash | 29 +++-------------------- tldr/regex | 8 +++++-- tldr/smbmap | 6 ++--- tldr/snmpbulkget | 4 ++-- tldr/snmpdf | 2 +- tldr/snmpget | 4 ++-- tldr/snmpgetnext | 4 ++-- tldr/snmpnetstat | 2 +- tldr/snmpset | 2 +- tldr/snmpstatus | 2 +- tldr/snmptable | 2 +- tldr/snmptest | 2 +- tldr/snmpwalk | 10 ++++---- tldr/tdf | 25 ++++++++++++++++++++ tldr/ug | 12 ++++++++++ tldr/vue-init | 2 +- tldr/windows/replace | 2 +- 57 files changed, 368 insertions(+), 131 deletions(-) create mode 100644 tldr/3d-ascii-viewer create mode 100644 tldr/diff-so-fancy create mode 100644 tldr/gofumpt create mode 100644 tldr/kubectl-completion create mode 100644 tldr/linux/beet create mode 100644 tldr/mcat create mode 100644 tldr/tdf create mode 100644 tldr/ug diff --git a/tldr/3d-ascii-viewer b/tldr/3d-ascii-viewer new file mode 100644 index 00000000..a4ed475a --- /dev/null +++ b/tldr/3d-ascii-viewer @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# 3d-ascii-viewer + +> View 3D `.obj` models as animated ASCII in the terminal. +> More information: . + +- Display a model: + +`3d-ascii-viewer {{path/to/model}}.obj` + +- Set width and height: + +`3d-ascii-viewer -w {{width}} -h {{height}} {{path/to/model}}.obj` + +- Enable color: + +`3d-ascii-viewer --color {{path/to/model}}.obj` + +- Set frames per second: + +`3d-ascii-viewer -f {{fps}} {{path/to/model}}.obj` + +- Interactive mode: + +`3d-ascii-viewer --interactive {{path/to/model}}.obj` + +- Display help: + +`3d-ascii-viewer --help` diff --git a/tldr/android/pkg b/tldr/android/pkg index 4cae9a70..136bf4f0 100644 --- a/tldr/android/pkg +++ b/tldr/android/pkg @@ -10,20 +10,32 @@ source: https://github.com/tldr-pages/tldr.git - Upgrade all installed packages: -`pkg upgrade` +`pkg {{[up|upgrade]}}` + +- List currently installed packages: + +`pkg {{[list-i|list-installed]}}` - Install a package: -`pkg install {{package}}` +`pkg {{[i|install]}} {{package}}` - Uninstall a package: -`pkg uninstall {{package}}` +`pkg {{[un|uninstall]}} {{package}}` - Reinstall a package: -`pkg reinstall {{package}}` +`pkg {{[rei|reinstall]}} {{package}}` - Search for a package: -`pkg search {{package}}` +`pkg {{[se|search]}} {{package}}` + +- Show information about specific package: + +`pkg {{[sh|show]}} {{package}}` + +- Display help: + +`pkg {{[h|help]}}` diff --git a/tldr/bash b/tldr/bash index 1086d661..3f9e4069 100644 --- a/tldr/bash +++ b/tldr/bash @@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git - Start a [r]estricted shell session: -`bash -r` +`bash {{[-r|--restricted]}}` diff --git a/tldr/diff-so-fancy b/tldr/diff-so-fancy new file mode 100644 index 00000000..46488a4c --- /dev/null +++ b/tldr/diff-so-fancy @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# diff-so-fancy + +> Colorize `diff` output in a more human readable way. +> More information: . + +- Colorize `diff`: + +`diff {{[-u|--unified]}} {{path/to/file1}} {{path/to/file2}} | diff-so-fancy` + +- Set `diff-so-fancy` to colorize the output during Git's interactive staging: + +`git config --global interactive.diffFilter "diff-so-fancy --patch"` diff --git a/tldr/evil-winrm b/tldr/evil-winrm index 45b0fce3..97909a51 100644 --- a/tldr/evil-winrm +++ b/tldr/evil-winrm @@ -11,19 +11,19 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a host and start an interactive session: -`evil-winrm {{[-i|--ip]}} {{ip}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{password}}` +`evil-winrm {{[-i|--ip]}} {{ip_address}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{password}}` - Connect to a host using pass-the-hash authentication instead of a password: -`evil-winrm {{[-i|--ip]}} {{ip}} {{[-u|--user]}} {{user}} {{[-H|--hash]}} {{nt_hash}}` +`evil-winrm {{[-i|--ip]}} {{ip_address}} {{[-u|--user]}} {{user}} {{[-H|--hash]}} {{nt_hash}}` - Connect to a host, specifying directories for PowerShell scripts and executables: -`evil-winrm {{[-i|--ip]}} {{ip}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{password}} {{[-s|--scripts]}} {{path/to/scripts}} {{[-e|--executables]}} {{path/to/executables}}` +`evil-winrm {{[-i|--ip]}} {{ip_address}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{password}} {{[-s|--scripts]}} {{path/to/scripts}} {{[-e|--executables]}} {{path/to/executables}}` - Connect to a host, using SSL: -`evil-winrm {{[-i|--ip]}} {{ip}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{password}} {{[-S|--ssl]}} {{[-c|--pub-key]}} {{path/to/pubkey}} {{[-k|--priv-key]}} {{path/to/privkey}}` +`evil-winrm {{[-i|--ip]}} {{ip_address}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{password}} {{[-S|--ssl]}} {{[-c|--pub-key]}} {{path/to/pubkey}} {{[-k|--priv-key]}} {{path/to/privkey}}` - [Interactive] Upload a file to the host: diff --git a/tldr/gh-attestation b/tldr/gh-attestation index a83fb729..cf47d0c6 100644 --- a/tldr/gh-attestation +++ b/tldr/gh-attestation @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Download attestations for a local file associated with a specific repository: -`gh {{[at|attestation]}} download {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repo}}` +`gh {{[at|attestation]}} download {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repository}}` - Download attestations for an OCI container image associated with an organization: @@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git - Verify a local artifact online against attestations from a specific repository: -`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repo}}` +`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-R|--repo]}} {{owner}}/{{repository}}` - 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}}` +`gh {{[at|attestation]}} verify {{path/to/artifact.bin}} {{[-o|--owner]}} {{organization_name}} --signer-workflow {{owner}}/{{repository}}/{{path/to/workflow.yml}}` - Verify an artifact and output the detailed verification results as JSON for use in policy engines: diff --git a/tldr/gh-ruleset b/tldr/gh-ruleset index f5f6ee1d..b4d78931 100644 --- a/tldr/gh-ruleset +++ b/tldr/gh-ruleset @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Check the rules that apply to a specific branch in another repository: -`gh {{[rs|ruleset]}} check {{branch_name}} {{[-R|--repo]}} {{owner}}/{{repo}}` +`gh {{[rs|ruleset]}} check {{branch_name}} {{[-R|--repo]}} {{owner}}/{{repository}}` - Interactively select and view a ruleset for the current repository: @@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git - Open the list of rulesets for a specific repository in the browser: -`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repo}} {{[-w|--web]}}` +`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repository}} {{[-w|--web]}}` diff --git a/tldr/gofumpt b/tldr/gofumpt new file mode 100644 index 00000000..995c9a71 --- /dev/null +++ b/tldr/gofumpt @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gofumpt + +> Strictly format Go files. +> See also: `gofmt`. +> More information: . + +- Format Go files: + +`gofumpt -w {{path/to/directory}}` + +- [l]ist files whose formatting differs from `gofumpt`: + +`gofumpt -l {{path/to/directory}}` + +- Report all [e]rrors: + +`gofumpt -e {{path/to/directory}}` + +- Display [d]iffs: + +`gofumpt -d {{path/to/directory}}` + +- Format Go files with stricter rules: + +`gofumpt -extra {{path/to/directory}}` + +- Display [d]iffs with stricter rules: + +`gofumpt -extra -d {{path/to/directory}}` + +- Display help: + +`gofumpt {{[-h|--help]}}` diff --git a/tldr/grep b/tldr/grep index 580b9919..b5365ae8 100644 --- a/tldr/grep +++ b/tldr/grep @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # grep > Find patterns in files using `regex`es. +> See also: `regex`. > More information: . - Search for a pattern within a file: diff --git a/tldr/hub-delete b/tldr/hub-delete index b63062e1..b24b3270 100644 --- a/tldr/hub-delete +++ b/tldr/hub-delete @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Delete personal repo on GitHub: -`hub delete {{repo}}` +`hub delete {{repository}}` diff --git a/tldr/ippeveprinter b/tldr/ippeveprinter index 053af9db..01f32b78 100644 --- a/tldr/ippeveprinter +++ b/tldr/ippeveprinter @@ -6,7 +6,6 @@ source: https://github.com/tldr-pages/tldr.git # ippeveprinter > A simple IPP Everywhere printer server. -> See also: `ippeveps`. > More information: . - Run the server with a specific service name: diff --git a/tldr/kubectl-completion b/tldr/kubectl-completion new file mode 100644 index 00000000..bfb5469c --- /dev/null +++ b/tldr/kubectl-completion @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl completion + +> Generate shell completion code for `kubectl` commands. +> More information: . + +- Print the completion script for Bash, Zsh, fish, or PowerShell: + +`kubectl completion {{bash|zsh|fish|powershell}}` + +- Load Bash or Zsh completions into the current shell session: + +`source <(kubectl completion {{bash|zsh}})` + +- Append Bash completion script to `~/.bashrc`: + +`kubectl completion bash >> ~/.bashrc` + +- Write Zsh completion script to a file in the `fpath`: + +`kubectl completion zsh > "${fpath[1]}/_kubectl"` + +- Load fish completions into the current shell session: + +`kubectl completion fish | source` + +- Persist fish completions: + +`kubectl completion fish > ~/.config/fish/completions/kubectl.fish` + +- Load PowerShell completions into the current shell session: + +`kubectl completion powershell | Out-String | Invoke-Expression` + +- Persist PowerShell completions: + +`kubectl completion powershell >> $PROFILE` diff --git a/tldr/linux/beet b/tldr/linux/beet new file mode 100644 index 00000000..993402c4 --- /dev/null +++ b/tldr/linux/beet @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# beet + +> Manage the beets media library. +> More information: . + +- Add music from a specific directory to the library, attempting to get correct tags for it from MusicBrainz: + +`beet import {{path/to/directory}}` + +- Add a single song to the library, attempting to get correct tags for it from MusicBrainz: + +`beet import {{[-s|--singletons]}} {{path/to/file}}` + +- Query library: + +`beet list {{query}}` + +- Show entire library statistics: + +`beet stats` + +- Show statistics for a specific query: + +`beet stats {{query}}` diff --git a/tldr/linux/braa b/tldr/linux/braa index d2d93237..a11d4652 100644 --- a/tldr/linux/braa +++ b/tldr/linux/braa @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Walk the SNMP tree of host with public string querying all OIDs under `.1.3.6`: -`braa public@{{ip}}:{{.1.3.6.*}}` +`braa public@{{ip_address}}:{{.1.3.6.*}}` - Query the whole subnet `ip_range` for `system.sysLocation.0`: @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Attempt to set the value of `system.sysLocation.0` to a specific workgroup: -`braa private@{{ip}}:{{.1.3.6.1.2.1.1.6.0}}=s'{{workgroup}}'` +`braa private@{{ip_address}}:{{.1.3.6.1.2.1.1.6.0}}=s'{{workgroup}}'` diff --git a/tldr/linux/dockerd b/tldr/linux/dockerd index 76a5a2dd..d24122f7 100644 --- a/tldr/linux/dockerd +++ b/tldr/linux/dockerd @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Run Docker daemon and configure it to listen to specific sockets (UNIX and TCP): -`dockerd {{[-H|--host]}} unix://{{path/to/tmp.sock}} {{[-H|--host]}} tcp://{{ip}}` +`dockerd {{[-H|--host]}} unix://{{path/to/tmp.sock}} {{[-H|--host]}} tcp://{{ip_address}}` - Run with specific daemon PID file: diff --git a/tldr/linux/fail2ban-client b/tldr/linux/fail2ban-client index 09f0f449..f8ea6a19 100644 --- a/tldr/linux/fail2ban-client +++ b/tldr/linux/fail2ban-client @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Remove the specified IP from the jail service's ban list: -`fail2ban-client set {{jail}} unbanip {{ip}}` +`fail2ban-client set {{jail}} unbanip {{ip_address}}` - Verify fail2ban server is alive: diff --git a/tldr/linux/ip b/tldr/linux/ip index 403c3e92..e0691fda 100644 --- a/tldr/linux/ip +++ b/tldr/linux/ip @@ -35,8 +35,8 @@ source: https://github.com/tldr-pages/tldr.git - Add/Delete an IP address to an interface: -`sudo ip {{[a|address]}} {{add|delete}} {{ip}}/{{mask}} dev {{ethX}}` +`sudo ip {{[a|address]}} {{add|delete}} {{ip_address}}/{{mask}} dev {{ethX}}` - Add a default route: -`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip}} dev {{ethX}}` +`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip_address}} dev {{ethX}}` diff --git a/tldr/linux/ip-route-add b/tldr/linux/ip-route-add index fbb24dc4..26a89dcc 100644 --- a/tldr/linux/ip-route-add +++ b/tldr/linux/ip-route-add @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Add a route to a specific routing table: -`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip}}` +`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip_address}}` diff --git a/tldr/linux/iptables b/tldr/linux/iptables index ccc0c9ae..8ddcaa1a 100644 --- a/tldr/linux/iptables +++ b/tldr/linux/iptables @@ -20,11 +20,11 @@ source: https://github.com/tldr-pages/tldr.git - Append rule to chain policy for IP: -`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip}} {{[-j|--jump]}} {{rule}}` +`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip_address}} {{[-j|--jump]}} {{rule}}` - Append rule to chain policy for IP considering protocol and port: -`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip}} {{[-p|--protocol]}} {{tcp|udp|icmp|...}} --dport {{port}} {{[-j|--jump]}} {{rule}}` +`sudo iptables {{[-A|--append]}} {{chain}} {{[-s|--source]}} {{ip_address}} {{[-p|--protocol]}} {{tcp|udp|icmp|...}} --dport {{port}} {{[-j|--jump]}} {{rule}}` - Add a NAT rule to translate all traffic from the `192.168.0.0/24` subnet to the host's public IP: diff --git a/tldr/linux/qm-cloudinit b/tldr/linux/qm-cloudinit index 9a76470b..8feab49e 100644 --- a/tldr/linux/qm-cloudinit +++ b/tldr/linux/qm-cloudinit @@ -5,25 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # qm cloudinit -> Configure cloudinit settings for virtual machines managed by Proxmox Virtual Environment (PVE). -> More information: . +> Manage Cloud-Init settings. +> More information: . -- Configure cloudinit settings for a specific user and set password for the user: +- Generate a cloudinit file for a specific configuration type: -`qm {{[clou|cloudinit]}} {{vm_id}} -user={{user}} -password={{password}}` - -- Configure cloudinit settings for a specific user and set password for the user with a specific SSH key: - -`qm {{[clou|cloudinit]}} {{vm_id}} -user={{user}} -password={{password}} -sshkey={{ssh_key}}` - -- Set the hostname for a specific virtual machine: - -`qm {{[clou|cloudinit]}} {{vm_id}} -hostname={{hostname}}` - -- Configure the network interface settings for a specific virtual machine: - -`qm {{[clou|cloudinit]}} {{vm_id}} -ipconfig {{ipconfig}}` - -- Configure a shell script to execute before `cloudinit` is run on a virtual machine: - -`qm {{[clou|cloudinit]}} {{vm_id}} -pre {{script}}` +`qm {{[clou|cloudinit]}} {{[d|dump]}} {{virtual_machine_id}} {{meta|network|user}}` diff --git a/tldr/linux/qm-disk b/tldr/linux/qm-disk index 4efd2a44..76002859 100644 --- a/tldr/linux/qm-disk +++ b/tldr/linux/qm-disk @@ -23,3 +23,15 @@ source: https://github.com/tldr-pages/tldr.git - Import a VMDK/`.qcow2`/raw disk image using a specific storage name: `qm {{[di|disk]}} {{[i|import]}} {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}` + +- Rescan all storages and update disk sizes and unused disk images: + +`qm {{[di|disk]}} {{[resc|rescan]}}` + +- Perform a dry-run of a rescan and do not write any changes to configurations: + +`qm {{[di|disk]}} {{[resc|rescan]}} --dryrun` + +- Specify a virtual machine by its ID: + +`qm {{[di|disk]}} {{[resc|rescan]}} --vmid {{100}}` diff --git a/tldr/linux/qm-guest b/tldr/linux/qm-guest index fce89a28..bf206534 100644 --- a/tldr/linux/qm-guest +++ b/tldr/linux/qm-guest @@ -16,6 +16,10 @@ source: https://github.com/tldr-pages/tldr.git `qm {{[g|guest]}} {{[p|passwd]}} {{vm_id}} {{username}}` +- Set an already hashed password for a specific user in a virtual machine interactively: + +`qm {{[g|guest]}} {{[p|passwd]}} {{vm_id}} {{username}} --crypted 1` + - Execute a specific QEMU Guest Agent command: `qm {{[g|guest]}} {{[c|cmd]}} {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}` @@ -23,3 +27,15 @@ source: https://github.com/tldr-pages/tldr.git - Execute a specific command via a guest agent: `qm {{[g|guest]}} exec {{vm_id}} {{command}} {{argument1 argument2 ...}}` + +- Execute a specific command via a guest agent asynchronously: + +`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0` + +- Execute a specific command via a guest agent with a specified timeout of 10 seconds: + +`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}` + +- Execute a specific command via a guest agent and forward input from `stdin` until EOF to the guest agent: + +`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1` diff --git a/tldr/linux/rpcclient b/tldr/linux/rpcclient index 7b71a5ba..f040badc 100644 --- a/tldr/linux/rpcclient +++ b/tldr/linux/rpcclient @@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a remote host: -`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{ip}}` +`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{ip_address}}` - Connect to a remote host on a domain without a password: -`rpcclient {{[-U|--user]}} {{username}} {{[-W|--workgroup]}} {{domain}} {{[-N|--no-pass]}} {{ip}}` +`rpcclient {{[-U|--user]}} {{username}} {{[-W|--workgroup]}} {{domain}} {{[-N|--no-pass]}} {{ip_address}}` - Connect to a remote host, passing the password hash: -`rpcclient {{[-U|--user]}} {{domain}}\{{username}} --pw-nt-hash {{ip}}` +`rpcclient {{[-U|--user]}} {{domain}}\{{username}} --pw-nt-hash {{ip_address}}` - Execute shell commands on a remote host: -`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{[-c|--command]}} {{semicolon_separated_commands}} {{ip}}` +`rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{[-c|--command]}} {{semicolon_separated_commands}} {{ip_address}}` - Display domain users: diff --git a/tldr/linux/startx b/tldr/linux/startx index 2786bde6..59721de7 100644 --- a/tldr/linux/startx +++ b/tldr/linux/startx @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # startx > A front-end to `xinit` that provides a nice user interface for running a single session of the X Window System. -> More information: . +> More information: . - Start an X session: diff --git a/tldr/linux/torsocks b/tldr/linux/torsocks index 4f605d96..3621f4a5 100644 --- a/tldr/linux/torsocks +++ b/tldr/linux/torsocks @@ -31,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a Tor proxy running on a specific address and port: -`torsocks {{[-a|--address]}} {{ip}} {{[-P|--port]}} {{port}} {{command}}` +`torsocks {{[-a|--address]}} {{ip_address}} {{[-P|--port]}} {{port}} {{command}}` diff --git a/tldr/linux/xdg-user-dirs-update b/tldr/linux/xdg-user-dirs-update index 53dd7e67..765aaace 100644 --- a/tldr/linux/xdg-user-dirs-update +++ b/tldr/linux/xdg-user-dirs-update @@ -9,10 +9,10 @@ source: https://github.com/tldr-pages/tldr.git > See also: `xdg-user-dir`. > More information: . -- Change XDG's DESKTOP directory to the specified directory (must be absolute): +- Change XDG's DESKTOP directory to the specified directory: -`xdg-user-dirs-update --set DESKTOP "{{path/to/directory}}"` +`xdg-user-dirs-update --set DESKTOP "/{{path/to/directory}}"` - Write the result to the specified dry-run-file instead of the `user-dirs.dirs` file: -`xdg-user-dirs-update --dummy-output "{{path/to/dry_run_file}}" --set {{xdg_user_directory}} "{{path/to/directory}}"` +`xdg-user-dirs-update --dummy-output "{{path/to/dry_run_file}}" --set {{xdg_user_directory}} "/{{path/to/directory}}"` diff --git a/tldr/mcat b/tldr/mcat new file mode 100644 index 00000000..49d5eb68 --- /dev/null +++ b/tldr/mcat @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# mcat + +> Parse, convert, and preview files (including Markdown), directories, images, and videos. +> More information: . + +- Display the contents of a file: + +`mcat {{path/to/file}}` + +- Display a Markdown file with a specific theme: + +`mcat {{[-t|--theme]}} {{theme_name}} {{path/to/file.md}}` + +- Display an image or video inline: + +`mcat {{[-i|--output inline]}} {{path/to/file}}` + +- Convert a file to a specific format (e.g. `html`, `md`, `image`): + +`mcat {{[-o|--output]}} {{format}} {{path/to/file}}` + +- List the contents of a directory: + +`mcat {{path/to/directory}}` + +- List the contents of a directory, including hidden files: + +`mcat {{[-a|--hidden]}} {{path/to/directory}}` + +- Display content without paging: + +`mcat {{[-P|--paging never]}} {{path/to/file}}` diff --git a/tldr/ncmpcpp b/tldr/ncmpcpp index bcc657f1..14e641ad 100644 --- a/tldr/ncmpcpp +++ b/tldr/ncmpcpp @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a music player daemon on a given host and port: -`ncmpcpp --host {{ip}} --port {{port}}` +`ncmpcpp --host {{ip_address}} --port {{port}}` - Display metadata of the current song to console: diff --git a/tldr/nix-run b/tldr/nix-run index 40696413..ae216582 100644 --- a/tldr/nix-run +++ b/tldr/nix-run @@ -23,16 +23,16 @@ source: https://github.com/tldr-pages/tldr.git - Run from a remote repository: -`nix run {{remote_name}}:{{owner}}/{{repo}}` +`nix run {{remote_name}}:{{owner}}/{{repository}}` - Run from a remote repository using a specific tag, revision, or branch: -`nix run {{remote_name}}:{{owner}}/{{repo}}/{{reference}}` +`nix run {{remote_name}}:{{owner}}/{{repository}}/{{reference}}` - Run from a remote repository specifying a subdirectory and a program: -`nix run "{{remote_name}}:{{owner}}/{{repo}}?dir={{dir_name}}#{{app}}"` +`nix run "{{remote_name}}:{{owner}}/{{repository}}?dir={{dir_name}}#{{app}}"` - Run the flake of a GitHub pull request: -`nix run github:{{owner}}/{{repo}}/pull/{{number}}/head` +`nix run github:{{owner}}/{{repository}}/pull/{{number}}/head` diff --git a/tldr/npm-cache b/tldr/npm-cache index 55b9e688..e8967d56 100644 --- a/tldr/npm-cache +++ b/tldr/npm-cache @@ -12,30 +12,26 @@ source: https://github.com/tldr-pages/tldr.git `npm cache add {{package_name}}` -- Remove a specific package from the cache: - -`npm cache remove {{package_name}}` - - Clear a specific cached item by key: `npm cache clean {{key}}` - Clear the entire npm cache: -`npm cache clean --force` +`npm cache clean {{[-f|--force]}}` -- List the contents of the npm cache: +- List cached packages: `npm cache ls` +- List cached packages matching a specific name and version: + +`npm cache ls {{name}}@{{version}}` + - Verify the integrity of the npm cache: `npm cache verify` -- Show the cache path: +- List all entries in the npx cache: -`npm {{[c|config]}} get cache` - -- Change the cache path: - -`npm {{[c|config]}} set cache {{path/to/directory}}` +`npm cache npx ls` diff --git a/tldr/odpscmd-auth b/tldr/odpscmd-auth index 4c28ee1b..1ffbc014 100644 --- a/tldr/odpscmd-auth +++ b/tldr/odpscmd-auth @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # odpscmd auth > User authorities in ODPS (Open Data Processing Service). -> See also: `odps`. +> See also: `odpscmd`. > More information: . - [Interactive] Add a user to the current project: diff --git a/tldr/odpscmd-func b/tldr/odpscmd-func index c6654edc..cb19e0b0 100644 --- a/tldr/odpscmd-func +++ b/tldr/odpscmd-func @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # odpscmd func > Manage functions in ODPS (Open Data Processing Service). -> See also: `odps`. +> See also: `odpscmd`. > More information: . - [Interactive] Show functions in the current project: diff --git a/tldr/odpscmd-inst b/tldr/odpscmd-inst index 4c58b9b2..c30bb829 100644 --- a/tldr/odpscmd-inst +++ b/tldr/odpscmd-inst @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # odpscmd inst > Manage instances in ODPS (Open Data Processing Service). -> See also: `odps`. +> See also: `odpscmd`. > More information: . - [Interactive] Show instances created by current user: diff --git a/tldr/odpscmd-resource b/tldr/odpscmd-resource index bf66c846..248df447 100644 --- a/tldr/odpscmd-resource +++ b/tldr/odpscmd-resource @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # odpscmd resource > Manage resources in ODPS (Open Data Processing Service). -> See also: `odps`. +> See also: `odpscmd`. > More information: . - [Interactive] Show resources in the current project: diff --git a/tldr/odpscmd-table b/tldr/odpscmd-table index dec9e0da..cb23b3e7 100644 --- a/tldr/odpscmd-table +++ b/tldr/odpscmd-table @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # odpscmd table > Create and modify tables in ODPS (Open Data Processing Service). -> See also: `odps`. +> See also: `odpscmd`. > More information: . - [Interactive] Create a table with partition and lifecycle: diff --git a/tldr/odpscmd-tunnel b/tldr/odpscmd-tunnel index 8e27fe57..261653d5 100644 --- a/tldr/odpscmd-tunnel +++ b/tldr/odpscmd-tunnel @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # odpscmd tunnel > Data tunnel in ODPS (Open Data Processing Service). -> See also: `odps`. +> See also: `odpscmd`. > More information: . - [Interactive] Download table to local file: diff --git a/tldr/osx/csrutil b/tldr/osx/csrutil index d8ffb2fd..5c598145 100644 --- a/tldr/osx/csrutil +++ b/tldr/osx/csrutil @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Add an IPv4 address to the list of allowed NetBoot sources: -`csrutil netboot add {{ip}}` +`csrutil netboot add {{ip_address}}` - Reset the System Integrity Protection status and clear the NetBoot list: diff --git a/tldr/pkgz b/tldr/pkgz index b399609e..bdc32f28 100644 --- a/tldr/pkgz +++ b/tldr/pkgz @@ -20,6 +20,10 @@ source: https://github.com/tldr-pages/tldr.git `pkgz search {{package_name}}` +- Show enabled sources with the package available and/or installed: + +`pkgz info {{package_name}}` + - Update all packages in all sources: `pkgz update` diff --git a/tldr/podman-image b/tldr/podman-image index 4f14e40c..6d45450f 100644 --- a/tldr/podman-image +++ b/tldr/podman-image @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # podman image > Manage OCI/Docker container images. -> See also: `podman build`, `podman import`, `podman pull`. +> See also: `podman build`, `podman import`. > More information: . - List local container images: diff --git a/tldr/qdbus b/tldr/qdbus index 81f5106b..edde8cdb 100644 --- a/tldr/qdbus +++ b/tldr/qdbus @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # qdbus > Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism originally developed for Linux. -> More information: . +> More information: . - List available service names: diff --git a/tldr/rbash b/tldr/rbash index d8085829..a9a11261 100644 --- a/tldr/rbash +++ b/tldr/rbash @@ -5,31 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # rbash -> Restricted Bash shell, equivalent to `bash --restricted`. -> Does not permit changing the working directory, redirecting command output, or modifying environment variables, among other things. -> See also: `!` and `^` for history expansion. -> More information: . +> This command is an alias of `bash --restricted`. -- Start an interactive shell session: +- View documentation for the original command: -`rbash` - -- Execute a command and then exit: - -`rbash -c "{{command}}"` - -- Execute a script: - -`rbash {{path/to/script.sh}}` - -- Execute a script, printing each command before executing it: - -`rbash -x {{path/to/script.sh}}` - -- Execute commands from a script, stopping at the first error: - -`rbash -e {{path/to/script.sh}}` - -- Read and execute commands from `stdin`: - -`rbash -s` +`tldr bash` diff --git a/tldr/regex b/tldr/regex index e411a7f4..e0ffac0e 100644 --- a/tldr/regex +++ b/tldr/regex @@ -29,10 +29,14 @@ source: https://github.com/tldr-pages/tldr.git `[{{abc}}]` -- Match a range of characters: +- Match ranges of characters: -`[{{a-z3-9}}]` +`[{{a-z}}][{{3-9}}]` - Match anything but the specified character: `[^{{a}}]` + +- Match a boundary around a word: + +`"{{text}}"` diff --git a/tldr/smbmap b/tldr/smbmap index 11d21702..a21df9cb 100644 --- a/tldr/smbmap +++ b/tldr/smbmap @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Display SMB shares and permissions on a [H]ost, prompting for user's password or NTLM hash: -`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip}}` +`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip_address}}` - Execute a shell command on a remote system: -`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip}} -x {{command}}` +`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip_address}} -x {{command}}` - Enumerate hosts and check SMB file permissions: @@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git - Display SMB shares and recursively list directories and files, searching for file content matching a `regex`: -`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip}} -R -F {{pattern}}` +`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip_address}} -R -F {{pattern}}` diff --git a/tldr/snmpbulkget b/tldr/snmpbulkget index 010351b6..5a87fed6 100644 --- a/tldr/snmpbulkget +++ b/tldr/snmpbulkget @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - Request the next value from the SNMP agent: -`snmpbulkget -v {{version}} -c {{community}} {{ip}} {{oid}}` +`snmpbulkget -v {{version}} -c {{community}} {{ip_address}} {{oid}}` - Display the full Object Identifier (OID) path: -`snmpbulkget -v {{version}} -c {{community}} -O f {{ip}} {{oid}}` +`snmpbulkget -v {{version}} -c {{community}} -O f {{ip_address}} {{oid}}` - Display help: diff --git a/tldr/snmpdf b/tldr/snmpdf index b9b13434..66206c2d 100644 --- a/tldr/snmpdf +++ b/tldr/snmpdf @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Fetch the disk space usage: -`snmpdf -v {{version}} -c {{community}} {{ip}}` +`snmpdf -v {{version}} -c {{community}} {{ip_address}}` - Display help: diff --git a/tldr/snmpget b/tldr/snmpget index 63331f6e..352749f0 100644 --- a/tldr/snmpget +++ b/tldr/snmpget @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - Request a single value from the SNMP agent: -`snmpget -v {{version}} -c {{community}} {{ip}} {{oid}}` +`snmpget -v {{version}} -c {{community}} {{ip_address}} {{oid}}` - Display the full Object Identifier (OID) path: -`snmpget -v {{version}} -c {{community}} -O f {{ip}} {{oid}}` +`snmpget -v {{version}} -c {{community}} -O f {{ip_address}} {{oid}}` - Display help: diff --git a/tldr/snmpgetnext b/tldr/snmpgetnext index 631ea721..1ea7eff0 100644 --- a/tldr/snmpgetnext +++ b/tldr/snmpgetnext @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - Request the next value from the SNMP agent: -`snmpgetnext -v {{version}} -c {{community}} {{ip}} {{oid}}` +`snmpgetnext -v {{version}} -c {{community}} {{ip_address}} {{oid}}` - Display the full Object Identifier (OID) path: -`snmpgetnext -v {{version}} -c {{community}} -O f {{ip}} {{oid}}` +`snmpgetnext -v {{version}} -c {{community}} -O f {{ip_address}} {{oid}}` - Display help: diff --git a/tldr/snmpnetstat b/tldr/snmpnetstat index 9fac59f2..92e6e13c 100644 --- a/tldr/snmpnetstat +++ b/tldr/snmpnetstat @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Fetch the networking status: -`snmpnetstat -v {{version}} -c {{community}} {{ip}}` +`snmpnetstat -v {{version}} -c {{community}} {{ip_address}}` - Display help: diff --git a/tldr/snmpset b/tldr/snmpset index f010aecf..4f380e72 100644 --- a/tldr/snmpset +++ b/tldr/snmpset @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Set a value: -`snmpset -v {{version}} -c {{community}} {{ip}} {{oid}} {{value_type}} {{value}}` +`snmpset -v {{version}} -c {{community}} {{ip_address}} {{oid}} {{value_type}} {{value}}` - Display help: diff --git a/tldr/snmpstatus b/tldr/snmpstatus index f02568bf..00ba8c0b 100644 --- a/tldr/snmpstatus +++ b/tldr/snmpstatus @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Fetch the values: -`snmpstatus -v {{version}} -c {{community}} {{ip}}` +`snmpstatus -v {{version}} -c {{community}} {{ip_address}}` - Display help: diff --git a/tldr/snmptable b/tldr/snmptable index 46d5ce3e..9932d694 100644 --- a/tldr/snmptable +++ b/tldr/snmptable @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Fetch data: -`snmptable -v {{version}} -c {{community}} {{ip}} {{oid}}` +`snmptable -v {{version}} -c {{community}} {{ip_address}} {{oid}}` - Display help: diff --git a/tldr/snmptest b/tldr/snmptest index e912f499..fbf88f2e 100644 --- a/tldr/snmptest +++ b/tldr/snmptest @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Start the prompt: -`snmptest -v {{version}} -c {{community}} {{ip}}` +`snmptest -v {{version}} -c {{community}} {{ip_address}}` - Display help: diff --git a/tldr/snmpwalk b/tldr/snmpwalk index 7af53971..54a9d3f8 100644 --- a/tldr/snmpwalk +++ b/tldr/snmpwalk @@ -10,23 +10,23 @@ source: https://github.com/tldr-pages/tldr.git - Query the system information of a remote host using SNMPv1 and a community string: -`snmpwalk -v 1 -c {{community}} {{ip}}` +`snmpwalk -v 1 -c {{community}} {{ip_address}}` - Query system information on a remote host by OID using SNMPv2 on a specified port: -`snmpwalk -v 2c -c {{community}} {{ip}}:{{port}} {{oid}}` +`snmpwalk -v 2c -c {{community}} {{ip_address}}:{{port}} {{oid}}` - Query system information on a remote host by OID using SNMPv3 and authentication without encryption: -`snmpwalk -v 3 -l {{authNoPriv}} -u {{username}} -a {{MD5|SHA}} -A {{passphrase}} {{ip}} {{oid}}` +`snmpwalk -v 3 -l {{authNoPriv}} -u {{username}} -a {{MD5|SHA}} -A {{passphrase}} {{ip_address}} {{oid}}` - Query system information on a remote host by OID using SNMPv3, authentication, and encryption: -`snmpwalk -v 3 -l {{authPriv}} -u {{username}} -a {{MD5|SHA}} -A {{auth_passphrase}} -x {{DES|AES}} -X {{enc_passphrase}} {{ip}} {{oid}}` +`snmpwalk -v 3 -l {{authPriv}} -u {{username}} -a {{MD5|SHA}} -A {{auth_passphrase}} -x {{DES|AES}} -X {{enc_passphrase}} {{ip_address}} {{oid}}` - Query system information on a remote host by OID using SNMPv3 without authentication or encryption: -`snmpwalk -v 3 -l {{noAuthNoPriv}} -u {{username}} {{ip}} {{oid}}` +`snmpwalk -v 3 -l {{noAuthNoPriv}} -u {{username}} {{ip_address}} {{oid}}` - Display help: diff --git a/tldr/tdf b/tldr/tdf new file mode 100644 index 00000000..3ebd68ab --- /dev/null +++ b/tldr/tdf @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# tdf + +> A tui PDF viewer. +> More information: . + +- Open a specific file: + +`tdf {{path/to/file}}.pdf` + +- Open in fullscreen mode: + +`tdf {{[-f|--fullscreen]}} {{path/to/file}}.pdf` + +- Set a custom white color: + +`tdf {{[-w|--white-color]}} {{ffffff}} {{path/to/file}}.pdf` + +- Set a custom black color: + +`tdf {{[-b|--black-color]}} "rgb({{0}}, {{0}}, {{0}})" {{path/to/file}}.pdf` diff --git a/tldr/ug b/tldr/ug new file mode 100644 index 00000000..3c5c01ea --- /dev/null +++ b/tldr/ug @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# ug + +> This command is an alias of `ugrep --config --pretty --sort`. + +- View documentation for the original command: + +`tldr ugrep` diff --git a/tldr/vue-init b/tldr/vue-init index fb24c215..afd99058 100644 --- a/tldr/vue-init +++ b/tldr/vue-init @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Create a new project using a template from GitHub: -`vue init {{username}}/{{repo}} {{project_name}}` +`vue init {{username}}/{{repository}} {{project_name}}` diff --git a/tldr/windows/replace b/tldr/windows/replace index 9d072168..5b4ca478 100644 --- a/tldr/windows/replace +++ b/tldr/windows/replace @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # replace > Replace files. -> See also: `robocopy`, `move`, `copy`, `del`. +> See also: `robocopy`, `move`, `del`. > More information: . - Replace the destination file with the one from the source directory: