From 78c884f69cb94eb7f97db07a7c0b178c8fb402d9 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 11 Mar 2026 00:24:37 +0000 Subject: [PATCH] Update cheatsheets --- tldr/asciinema | 2 +- tldr/git-worktree | 16 +++++++++++-- tldr/linux/owut | 37 ++++++++++++++++++++++++++++++ tldr/linux/update-ca-certificates | 25 ++++++++++++++++++++ tldr/ri | 22 ++++++++++++++++++ tldr/ruby | 2 +- tldr/sherlock | 38 +++++++++++++++++++++++++++++++ tldr/xargs | 18 +++++++-------- 8 files changed, 147 insertions(+), 13 deletions(-) create mode 100644 tldr/linux/owut create mode 100644 tldr/linux/update-ca-certificates create mode 100644 tldr/ri create mode 100644 tldr/sherlock diff --git a/tldr/asciinema b/tldr/asciinema index 9b93a415..8aecb168 100644 --- a/tldr/asciinema +++ b/tldr/asciinema @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # asciinema > Record and replay terminal sessions, and optionally share them on . -> See also: `terminalizer`. +> See also: `terminalizer`, `agg`. > More information: . - Associate the local install of `asciinema` with an asciinema.org account: diff --git a/tldr/git-worktree b/tldr/git-worktree index 7eb2a372..7a077e26 100644 --- a/tldr/git-worktree +++ b/tldr/git-worktree @@ -8,6 +8,10 @@ source: https://github.com/tldr-pages/tldr.git > Manage multiple working trees attached to the same repository. > More information: . +- 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: `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}}` -- List all the working directories attached to this repository: +- List all the working directories (including the primary one): `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` diff --git a/tldr/linux/owut b/tldr/linux/owut new file mode 100644 index 00000000..3c032613 --- /dev/null +++ b/tldr/linux/owut @@ -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: . + +- 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` diff --git a/tldr/linux/update-ca-certificates b/tldr/linux/update-ca-certificates new file mode 100644 index 00000000..ff2fb160 --- /dev/null +++ b/tldr/linux/update-ca-certificates @@ -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: . + +- 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` diff --git a/tldr/ri b/tldr/ri new file mode 100644 index 00000000..09a7840a --- /dev/null +++ b/tldr/ri @@ -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: . + +- 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]}}` diff --git a/tldr/ruby b/tldr/ruby index 150d00d1..3dfe0b2a 100644 --- a/tldr/ruby +++ b/tldr/ruby @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # ruby > Ruby programming language interpreter. -> See also: `gem`, `bundler`, `rake`, `irb`. +> See also: `gem`, `bundler`, `rake`, `irb`, `ri`. > More information: . - Execute a Ruby script: diff --git a/tldr/sherlock b/tldr/sherlock new file mode 100644 index 00000000..bf63bab9 --- /dev/null +++ b/tldr/sherlock @@ -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: . + +- 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` diff --git a/tldr/xargs b/tldr/xargs index 72699ce0..8150f98b 100644 --- a/tldr/xargs +++ b/tldr/xargs @@ -18,26 +18,26 @@ source: https://github.com/tldr-pages/tldr.git `{{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): - -`find . -name '*.log' -print0 | xargs {{[-0|--null]}} {{[-P|--max-procs]}} {{4}} {{[-n|--max-args]}} 1 gzip` - -- Execute the command once per argument: +- Execute a new command with each argument: `{{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: `{{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`): `{{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: `{{arguments_source}} | xargs {{[-o|--open-tty]}} {{command}}`