mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-11 08:58:29 +00:00
Update cheatsheets
This commit is contained in:
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# asciinema
|
# asciinema
|
||||||
|
|
||||||
> Record and replay terminal sessions, and optionally share them on <https://asciinema.org>.
|
> Record and replay terminal sessions, and optionally share them on <https://asciinema.org>.
|
||||||
> See also: `terminalizer`.
|
> See also: `terminalizer`, `agg`.
|
||||||
> More information: <https://docs.asciinema.org/manual/cli/>.
|
> More information: <https://docs.asciinema.org/manual/cli/>.
|
||||||
|
|
||||||
- Associate the local install of `asciinema` with an asciinema.org account:
|
- Associate the local install of `asciinema` with an asciinema.org account:
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
> Manage multiple working trees attached to the same repository.
|
> Manage multiple working trees attached to the same repository.
|
||||||
> More information: <https://git-scm.com/docs/git-worktree>.
|
> More information: <https://git-scm.com/docs/git-worktree>.
|
||||||
|
|
||||||
|
- Add a new worktree directory for a branch with the same name (created if missing):
|
||||||
|
|
||||||
|
`git worktree add {{branch}}`
|
||||||
|
|
||||||
- Create a new directory with the specified branch checked out into it:
|
- Create a new directory with the specified branch checked out into it:
|
||||||
|
|
||||||
`git worktree add {{path/to/directory}} {{branch}}`
|
`git worktree add {{path/to/directory}} {{branch}}`
|
||||||
@@ -16,10 +20,18 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`git worktree add {{path/to/directory}} -b {{new_branch}}`
|
`git worktree add {{path/to/directory}} -b {{new_branch}}`
|
||||||
|
|
||||||
- List all the working directories attached to this repository:
|
- List all the working directories (including the primary one):
|
||||||
|
|
||||||
`git worktree list`
|
`git worktree list`
|
||||||
|
|
||||||
- Remove a worktree (after deleting worktree directory):
|
- Move an existing worktree to a new location:
|
||||||
|
|
||||||
|
`git worktree move {{path/to/worktree}} {{new/path}}`
|
||||||
|
|
||||||
|
- Remove a worktree directory and its metadata (only if it has no uncommitted changes):
|
||||||
|
|
||||||
|
`git worktree remove {{path/to/worktree}}`
|
||||||
|
|
||||||
|
- Remove metadata for a worktree directory that's been manually deleted:
|
||||||
|
|
||||||
`git worktree prune`
|
`git worktree prune`
|
||||||
|
|||||||
37
tldr/linux/owut
Normal file
37
tldr/linux/owut
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# owut
|
||||||
|
|
||||||
|
> OpenWrt Upgrade Tool for automating builds and installs via Attended SysUpgrade (ASU).
|
||||||
|
> More information: <https://openwrt.org/docs/guide-user/installation/sysupgrade.owut>.
|
||||||
|
|
||||||
|
- List available OpenWrt versions for the current device:
|
||||||
|
|
||||||
|
`owut versions`
|
||||||
|
|
||||||
|
- List user installed or removed packages:
|
||||||
|
|
||||||
|
`owut list`
|
||||||
|
|
||||||
|
- Check for updates without performing an upgrade:
|
||||||
|
|
||||||
|
`owut check`
|
||||||
|
|
||||||
|
- Automatically build, download, verify, and install the latest available firmware:
|
||||||
|
|
||||||
|
`owut upgrade`
|
||||||
|
|
||||||
|
- Upgrade to a specific version and include additional packages:
|
||||||
|
|
||||||
|
`owut upgrade {{[-V|--version-to]}} {{version}} {{[-a|--add]}} "{{htop vim}}"`
|
||||||
|
|
||||||
|
- Download and verify a specific image without installing it:
|
||||||
|
|
||||||
|
`owut download {{[-V|--version-to]}} {{25.12.0}}`
|
||||||
|
|
||||||
|
- Verify the latest downloaded image and install it (device will reboot):
|
||||||
|
|
||||||
|
`owut install`
|
||||||
25
tldr/linux/update-ca-certificates
Normal file
25
tldr/linux/update-ca-certificates
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# update-ca-certificates
|
||||||
|
|
||||||
|
> Update the CA certificates bundle and regenerate `/etc/ssl/certs`.
|
||||||
|
> More information: <https://manned.org/update-ca-certificates>.
|
||||||
|
|
||||||
|
- Update certificates:
|
||||||
|
|
||||||
|
`sudo update-ca-certificates`
|
||||||
|
|
||||||
|
- Update certificates in verbose mode:
|
||||||
|
|
||||||
|
`sudo update-ca-certificates {{[-v|--verbose]}}`
|
||||||
|
|
||||||
|
- Perform a fresh update (remove all symlinks and regenerate):
|
||||||
|
|
||||||
|
`sudo update-ca-certificates {{[-f|--fresh]}}`
|
||||||
|
|
||||||
|
- Add a custom certificate (copy it first, then update):
|
||||||
|
|
||||||
|
`sudo cp {{path/to/certificate.crt}} /usr/local/share/ca-certificates/ && sudo update-ca-certificates`
|
||||||
22
tldr/ri
Normal file
22
tldr/ri
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# ri
|
||||||
|
|
||||||
|
> Browse structured API documentation for Ruby.
|
||||||
|
> See also: `ruby`.
|
||||||
|
> More information: <https://ruby.github.io/rdoc/RI_md.html>.
|
||||||
|
|
||||||
|
- Start interactive shell:
|
||||||
|
|
||||||
|
`ri`
|
||||||
|
|
||||||
|
- View documentation for a particular name:
|
||||||
|
|
||||||
|
`ri {{File#read}}`
|
||||||
|
|
||||||
|
- List classes and modules for which `ri` has documentation:
|
||||||
|
|
||||||
|
`ri {{[-l|--list]}}`
|
||||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# ruby
|
# ruby
|
||||||
|
|
||||||
> Ruby programming language interpreter.
|
> Ruby programming language interpreter.
|
||||||
> See also: `gem`, `bundler`, `rake`, `irb`.
|
> See also: `gem`, `bundler`, `rake`, `irb`, `ri`.
|
||||||
> More information: <https://manned.org/ruby>.
|
> More information: <https://manned.org/ruby>.
|
||||||
|
|
||||||
- Execute a Ruby script:
|
- Execute a Ruby script:
|
||||||
|
|||||||
38
tldr/sherlock
Normal file
38
tldr/sherlock
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# sherlock
|
||||||
|
|
||||||
|
> Find usernames across social networks.
|
||||||
|
> See also: `maigret`.
|
||||||
|
> More information: <https://github.com/sherlock-project/sherlock>.
|
||||||
|
|
||||||
|
- Search for a specific username on social networks saving the results to a file:
|
||||||
|
|
||||||
|
`sherlock {{username}} --output {{path/to/file}}`
|
||||||
|
|
||||||
|
- Search for specific usernames on social networks saving the results into a directory:
|
||||||
|
|
||||||
|
`sherlock {{username1 username2 ...}} --folderoutput {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Search for a specific username on social networks using the Tor network:
|
||||||
|
|
||||||
|
`sherlock --tor {{username}}`
|
||||||
|
|
||||||
|
- Make requests over Tor with a new Tor circuit after each request:
|
||||||
|
|
||||||
|
`sherlock --unique-tor {{username}}`
|
||||||
|
|
||||||
|
- Search for a specific username on social networks using a proxy:
|
||||||
|
|
||||||
|
`sherlock {{username}} --proxy {{proxy_url}}`
|
||||||
|
|
||||||
|
- Search for a specific username on social networks and open results in the default web browser:
|
||||||
|
|
||||||
|
`sherlock {{username}} --browse`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`sherlock --help`
|
||||||
18
tldr/xargs
18
tldr/xargs
@@ -18,26 +18,26 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`{{arguments_source}} | xargs sh -c "{{command1}} && {{command2}} | {{command3}}"`
|
`{{arguments_source}} | xargs sh -c "{{command1}} && {{command2}} | {{command3}}"`
|
||||||
|
|
||||||
- Gzip all files with `.log` extension taking advantage of multiple threads (`-print0` uses a null character to split file names and `--null` uses it as delimiter):
|
- Execute a new command with each argument:
|
||||||
|
|
||||||
`find . -name '*.log' -print0 | xargs {{[-0|--null]}} {{[-P|--max-procs]}} {{4}} {{[-n|--max-args]}} 1 gzip`
|
|
||||||
|
|
||||||
- Execute the command once per argument:
|
|
||||||
|
|
||||||
`{{arguments_source}} | xargs {{[-n|--max-args]}} 1 {{command}}`
|
`{{arguments_source}} | xargs {{[-n|--max-args]}} 1 {{command}}`
|
||||||
|
|
||||||
|
- Raise the parallel process limit to 10 (default is 1; 0 means as many processes as possible):
|
||||||
|
|
||||||
|
`{{arguments_source}} | xargs {{[-P|--max-procs]}} 10 {{[-n|--max-args]}} {{1}} {{command}}`
|
||||||
|
|
||||||
- Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line:
|
- Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line:
|
||||||
|
|
||||||
`{{arguments_source}} | xargs -I _ {{command}} _ {{optional_extra_arguments}}`
|
`{{arguments_source}} | xargs -I _ {{command}} _ {{optional_extra_arguments}}`
|
||||||
|
|
||||||
- Parallel runs of up to `max-procs` processes at a time; the default is 1. If `max-procs` is 0, xargs will run as many processes as possible at a time:
|
|
||||||
|
|
||||||
`{{arguments_source}} | xargs {{[-P|--max-procs]}} {{max-procs}} {{command}}`
|
|
||||||
|
|
||||||
- Prompt user for confirmation before executing command (confirm with `y` or `Y`):
|
- Prompt user for confirmation before executing command (confirm with `y` or `Y`):
|
||||||
|
|
||||||
`{{arguments_source}} | xargs {{[-p|--interactive]}} {{command}}`
|
`{{arguments_source}} | xargs {{[-p|--interactive]}} {{command}}`
|
||||||
|
|
||||||
|
- Read a file for arguments to be given to a command:
|
||||||
|
|
||||||
|
`xargs {{[-a|--arg-file]}} {{path/to/file}} {{command}}`
|
||||||
|
|
||||||
- Allow the command to access the terminal for interactive input:
|
- Allow the command to access the terminal for interactive input:
|
||||||
|
|
||||||
`{{arguments_source}} | xargs {{[-o|--open-tty]}} {{command}}`
|
`{{arguments_source}} | xargs {{[-o|--open-tty]}} {{command}}`
|
||||||
|
|||||||
Reference in New Issue
Block a user