mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 22:47:54 +00:00
Update cheatsheets
This commit is contained in:
@@ -20,6 +20,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`cargo install --git {{repo_url}} --{{branch|tag|rev}} {{branch_name|tag|commit_hash}}`
|
||||
|
||||
- Install a package from a local directory:
|
||||
|
||||
`cargo install --path {{path/to/package}}`
|
||||
|
||||
- List all installed packages and their versions:
|
||||
|
||||
`cargo install --list`
|
||||
|
||||
10
tldr/exrex
10
tldr/exrex
@@ -15,23 +15,23 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Generate a random string that matches a `regex`:
|
||||
|
||||
`exrex --random '{{regex}}'`
|
||||
`exrex {{[-r|--random]}} '{{regex}}'`
|
||||
|
||||
- Generate at most 100 strings that match a `regex`:
|
||||
|
||||
`exrex --max-number {{100}} '{{regex}}'`
|
||||
`exrex {{[-m|--max-number]}} {{100}} '{{regex}}'`
|
||||
|
||||
- Generate all possible strings that match a `regex`, joined by a custom delimiter string:
|
||||
|
||||
`exrex --delimiter "{{, }}" '{{regex}}'`
|
||||
`exrex {{[-d|--delimiter]}} "{{, }}" '{{regex}}'`
|
||||
|
||||
- Print count of all possible strings that match a `regex`:
|
||||
|
||||
`exrex --count '{{regex}}'`
|
||||
`exrex {{[-c|--count]}} '{{regex}}'`
|
||||
|
||||
- Simplify a `regex`:
|
||||
|
||||
`exrex --simplify '{{ab|ac}}'`
|
||||
`exrex {{[-s|--simplify]}} '{{ab|ac}}'`
|
||||
|
||||
- Print eyes:
|
||||
|
||||
|
||||
12
tldr/file-rename
Normal file
12
tldr/file-rename
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# file-rename
|
||||
|
||||
> This command is an alias of `rename`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr -p common rename`
|
||||
17
tldr/linux/apt-install
Normal file
17
tldr/linux/apt-install
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# apt install
|
||||
|
||||
> Install packages for Debian-based distributions.
|
||||
> More information: <https://manned.org/apt.8>.
|
||||
|
||||
- Install a package, or update it to the latest version:
|
||||
|
||||
`sudo apt install {{package}}`
|
||||
|
||||
- Display verbose package version information during installation or update:
|
||||
|
||||
`sudo apt install {{[-V|--verbose-versions]}} {{package}}`
|
||||
@@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Add the Extra Packages for Enterprise Linux (EPEL) repositories:
|
||||
|
||||
`sudo dnf {{[in|install]}} https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm`
|
||||
`sudo dnf {{[in|install]}} https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{10}}.noarch.rpm`
|
||||
|
||||
- Add Remi's RPM repository:
|
||||
|
||||
`sudo dnf {{[in|install]}} https://rpms.remirepo.net/enterprise/remi-release-8.rpm`
|
||||
`sudo dnf {{[in|install]}} https://rpms.remirepo.net/enterprise/remi-release-{{8}}.rpm`
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Refresh the output every 2 seconds:
|
||||
|
||||
`free {{[-s|--seconds]}} {{2}}`
|
||||
`free {{[-s|--seconds]}} 2`
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -ipconfig {{ipconfig}}`
|
||||
|
||||
- Configure a shell script to execute before `cloud-ini` is run on a virtual machine:
|
||||
- Configure a shell script to execute before `cloudinit` is run on a virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -pre {{script}}`
|
||||
|
||||
@@ -5,32 +5,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rename
|
||||
|
||||
> Rename multiple files.
|
||||
> Note: This page refers to the command from the `util-linux` package.
|
||||
> For the Perl version, see `file-rename` or `perl-rename`.
|
||||
> Warning: This command has no safeguards and will overwrite files without prompting.
|
||||
> More information: <https://manned.org/rename>.
|
||||
> `rename` can refer to multiple commands with the same name.
|
||||
|
||||
- Rename files using simple substitutions (substitute 'foo' with 'bar' wherever found):
|
||||
- View documentation for the Perl version:
|
||||
|
||||
`rename {{foo}} {{bar}} {{*}}`
|
||||
`tldr -p common rename`
|
||||
|
||||
- Dry-run - display which renames would occur without performing them:
|
||||
- View documentation for the `util-linux` version:
|
||||
|
||||
`rename {{[-vn|--verbose --no-act]}} {{foo}} {{bar}} {{*}}`
|
||||
|
||||
- Do not overwrite existing files:
|
||||
|
||||
`rename {{[-o|--no-overwrite]}} {{foo}} {{bar}} {{*}}`
|
||||
|
||||
- Change file extensions:
|
||||
|
||||
`rename {{.ext}} {{.bak}} {{*.ext}}`
|
||||
|
||||
- Prepend "foo" to all filenames in the current directory:
|
||||
|
||||
`rename {{''}} {{'foo'}} {{*}}`
|
||||
|
||||
- Rename a group of increasingly numbered files zero-padding the numbers up to 3 digits:
|
||||
|
||||
`rename {{foo}} {{foo00}} {{foo?}} && rename {{foo}} {{foo0}} {{foo??}}`
|
||||
`tldr rename.util`
|
||||
|
||||
35
tldr/linux/rename.util
Normal file
35
tldr/linux/rename.util
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rename
|
||||
|
||||
> Rename multiple files.
|
||||
> WARNING: This command will overwrite files without prompting unless the dry-run option is used.
|
||||
> Note: This page refers to the command from the `util-linux` package.
|
||||
> More information: <https://manned.org/rename>.
|
||||
|
||||
- Rename files using simple substitutions (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{foo}} {{bar}} {{*}}`
|
||||
|
||||
- Dry-run - display which renames would occur without performing them:
|
||||
|
||||
`rename {{[-vn|--verbose --no-act]}} {{foo}} {{bar}} {{*}}`
|
||||
|
||||
- Do not overwrite existing files:
|
||||
|
||||
`rename {{[-o|--no-overwrite]}} {{foo}} {{bar}} {{*}}`
|
||||
|
||||
- Change file extensions:
|
||||
|
||||
`rename {{.ext}} {{.bak}} {{*.ext}}`
|
||||
|
||||
- Prepend "foo" to all filenames in the current directory:
|
||||
|
||||
`rename {{''}} {{'foo'}} {{*}}`
|
||||
|
||||
- Rename a group of increasingly numbered files zero-padding the numbers up to 3 digits:
|
||||
|
||||
`rename {{foo}} {{foo00}} {{foo?}} && rename {{foo}} {{foo0}} {{foo??}}`
|
||||
@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enroll the custom secure boot keys and Microsoft's UEFI vendor certificates:
|
||||
|
||||
`sbctl enroll-keys --microsoft`
|
||||
`sbctl enroll-keys {{[-m|--microsoft]}}`
|
||||
|
||||
- Automatically run `create-keys` and `enroll-keys` based on the settings in `/etc/sbctl/sbctl.conf`:
|
||||
|
||||
|
||||
37
tldr/manim
Normal file
37
tldr/manim
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# manim
|
||||
|
||||
> Animation engine for explanatory math videos.
|
||||
> More information: <https://docs.manim.community/en/stable/tutorials/quickstart.html>.
|
||||
|
||||
- Render a scene from a Python script using the default settings:
|
||||
|
||||
`manim {{path/to/file.py}} {{SceneName}}`
|
||||
|
||||
- Render with live preview (auto-opens the video file after rendering):
|
||||
|
||||
`manim {{[-pql|--preview --quality low]}} {{path/to/file.py}} {{SceneName}}`
|
||||
|
||||
- Render at high quality (1080p 60fps):
|
||||
|
||||
`manim {{[-pqh|--preview --quality high]}} {{path/to/file.py}} {{SceneName}}`
|
||||
|
||||
- Specify a custom output file name:
|
||||
|
||||
`manim {{[-o|--output_file]}} {{output_file_name}} {{path/to/file.py}} {{SceneName}}`
|
||||
|
||||
- Render using a specific resolution and frame rate:
|
||||
|
||||
`manim {{[-r|--resolution]}} {{1920,1080}} {{[-f|--fps]}} {{60}} {{path/to/file.py}} {{SceneName}}`
|
||||
|
||||
- List available scenes in a file without rendering:
|
||||
|
||||
`manim --list_scenes {{path/to/file.py}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`manim --help`
|
||||
12
tldr/perl-rename
Normal file
12
tldr/perl-rename
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# perl-rename
|
||||
|
||||
> This command is an alias of `rename`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr -p common rename`
|
||||
12
tldr/prename
Normal file
12
tldr/prename
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# prename
|
||||
|
||||
> This command is an alias of `rename`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr -p common rename`
|
||||
38
tldr/qwen
Normal file
38
tldr/qwen
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# qwen
|
||||
|
||||
> Launch an interactive prompt with Qwen3-Coder.
|
||||
> See also: `gemini`.
|
||||
> More information: <https://github.com/QwenLM/qwen-code>.
|
||||
|
||||
- Start a REPL session to chat interactively:
|
||||
|
||||
`qwen`
|
||||
|
||||
- Send the output of another command to Qwen and exit immediately:
|
||||
|
||||
`{{echo "Summarize the history of Rome"}} | qwen {{[-p|--prompt]}}`
|
||||
|
||||
- Override the default model (default: qwen3-coder-max):
|
||||
|
||||
`qwen {{[-m|--model]}} {{model_name}}`
|
||||
|
||||
- Run inside a sandbox container:
|
||||
|
||||
`qwen {{[-s|--sandbox]}}`
|
||||
|
||||
- Execute a prompt then stay in interactive mode:
|
||||
|
||||
`qwen {{[-i|--prompt-interactive]}} "{{Give me an example of recursion in Python}}"`
|
||||
|
||||
- Include all files in context:
|
||||
|
||||
`qwen {{[-a|--all-files]}}`
|
||||
|
||||
- Show memory usage in status bar:
|
||||
|
||||
`qwen --show-memory-usage`
|
||||
35
tldr/rename
Normal file
35
tldr/rename
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rename
|
||||
|
||||
> Rename a file or group of files with a regular expression.
|
||||
> WARNING: This command will overwrite files without prompting unless the dry-run option is used.
|
||||
> Note: This page refers to the Perl version, also known as `file-rename`.
|
||||
> More information: <https://manned.org/prename>.
|
||||
|
||||
- Replace `from` with `to` in the filenames of the specified files:
|
||||
|
||||
`rename 's/{{from}}/{{to}}/' {{*.txt}}`
|
||||
|
||||
- Dry-run - display which changes would occur without performing them:
|
||||
|
||||
`rename -n 's/{{from}}/{{to}}/' {{*.txt}}`
|
||||
|
||||
- Change the extension:
|
||||
|
||||
`rename 's/\.old$/\.new/' {{*.txt}}`
|
||||
|
||||
- Change to lowercase (use `-f` in case-insensitive filesystems):
|
||||
|
||||
`rename {{[-f|--force]}} 'y/A-Z/a-z/' {{*.txt}}`
|
||||
|
||||
- Capitalize first letter of every word in the name:
|
||||
|
||||
`rename {{[-f|--force]}} 's/(\w)/\U$1/g' {{*.txt}}`
|
||||
|
||||
- Replace spaces with underscores:
|
||||
|
||||
`rename 's/\s+/_/g' {{*.txt}}`
|
||||
Reference in New Issue
Block a user