mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-03 07:43:21 +00:00
Update cheatsheets
This commit is contained in:
33
tldr/3d-ascii-viewer
Normal file
33
tldr/3d-ascii-viewer
Normal file
@@ -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: <https://github.com/autopawn/3d-ascii-viewer>.
|
||||
|
||||
- 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`
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Start a [r]estricted shell session:
|
||||
|
||||
`bash -r`
|
||||
`bash {{[-r|--restricted]}}`
|
||||
|
||||
17
tldr/diff-so-fancy
Normal file
17
tldr/diff-so-fancy
Normal file
@@ -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: <https://github.com/so-fancy/diff-so-fancy#-usage>.
|
||||
|
||||
- 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"`
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
38
tldr/gofumpt
Normal file
38
tldr/gofumpt
Normal file
@@ -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: <https://github.com/mvdan/gofumpt#gofumpt>.
|
||||
|
||||
- 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]}}`
|
||||
@@ -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: <https://www.gnu.org/software/grep/manual/grep.html>.
|
||||
|
||||
- Search for a pattern within a file:
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete personal repo on GitHub:
|
||||
|
||||
`hub delete {{repo}}`
|
||||
`hub delete {{repository}}`
|
||||
|
||||
@@ -6,7 +6,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ippeveprinter
|
||||
|
||||
> A simple IPP Everywhere printer server.
|
||||
> See also: `ippeveps`.
|
||||
> More information: <https://openprinting.github.io/cups/doc/man-ippeveprinter.html>.
|
||||
|
||||
- Run the server with a specific service name:
|
||||
|
||||
41
tldr/kubectl-completion
Normal file
41
tldr/kubectl-completion
Normal file
@@ -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: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_completion/>.
|
||||
|
||||
- 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`
|
||||
29
tldr/linux/beet
Normal file
29
tldr/linux/beet
Normal file
@@ -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: <https://beets.readthedocs.io/en/stable/reference/cli.html>.
|
||||
|
||||
- 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}}`
|
||||
@@ -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}}'`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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: <https://pve.proxmox.com/pve-docs/qm.1.html>.
|
||||
> Manage Cloud-Init settings.
|
||||
> More information: <https://pve.proxmox.com/pve-docs/qm.1.html#cli_qm_cloudinit_dump>.
|
||||
|
||||
- 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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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: <https://x.org/releases/X11R7.5/doc/man/man1/startx.1.html>.
|
||||
> More information: <https://www.x.org/releases/X11R7.6/doc/man/man1/startx.1.xhtml>.
|
||||
|
||||
- Start an X session:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -9,10 +9,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `xdg-user-dir`.
|
||||
> More information: <https://manned.org/xdg-user-dirs-update>.
|
||||
|
||||
- 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}}"`
|
||||
|
||||
37
tldr/mcat
Normal file
37
tldr/mcat
Normal file
@@ -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: <https://github.com/Skardyy/mcat#example-usage>.
|
||||
|
||||
- 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}}`
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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: <https://www.alibabacloud.com/help/en/maxcompute/user-guide/maxcompute-client>.
|
||||
|
||||
- [Interactive] Add a user to the current project:
|
||||
|
||||
@@ -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: <https://www.alibabacloud.com/help/en/maxcompute/user-guide/maxcompute-client>.
|
||||
|
||||
- [Interactive] Show functions in the current project:
|
||||
|
||||
@@ -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: <https://www.alibabacloud.com/help/en/maxcompute/user-guide/maxcompute-client>.
|
||||
|
||||
- [Interactive] Show instances created by current user:
|
||||
|
||||
@@ -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: <https://www.alibabacloud.com/help/en/maxcompute/user-guide/maxcompute-client>.
|
||||
|
||||
- [Interactive] Show resources in the current project:
|
||||
|
||||
@@ -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: <https://www.alibabacloud.com/help/en/maxcompute/user-guide/maxcompute-client>.
|
||||
|
||||
- [Interactive] Create a table with partition and lifecycle:
|
||||
|
||||
@@ -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: <https://www.alibabacloud.com/help/en/maxcompute/user-guide/maxcompute-client>.
|
||||
|
||||
- [Interactive] Download table to local file:
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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: <https://docs.podman.io/en/latest/markdown/podman-image.1.html>.
|
||||
|
||||
- List local container images:
|
||||
|
||||
@@ -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: <https://doc.qt.io/archives/qt-5.15/qtdbus-index.html>.
|
||||
> More information: <https://doc.qt.io/qt-6/qtdbus-index.html>.
|
||||
|
||||
- List available service names:
|
||||
|
||||
|
||||
29
tldr/rbash
29
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: <https://www.gnu.org/software/bash/manual/bash.html#The-Restricted-Shell>.
|
||||
> 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`
|
||||
|
||||
@@ -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}}"`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
25
tldr/tdf
Normal file
25
tldr/tdf
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# tdf
|
||||
|
||||
> A tui PDF viewer.
|
||||
> More information: <https://github.com/itsjunetime/tdf>.
|
||||
|
||||
- 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`
|
||||
12
tldr/ug
Normal file
12
tldr/ug
Normal file
@@ -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`
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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: <https://learn.microsoft.com/windows-server/administration/windows-commands/replace>.
|
||||
|
||||
- Replace the destination file with the one from the source directory:
|
||||
|
||||
Reference in New Issue
Block a user