mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 03:24:04 +00:00
Update cheatsheets
This commit is contained in:
21
tldr/alr-help
Normal file
21
tldr/alr-help
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# alr help
|
||||||
|
|
||||||
|
> Display help information for Alire (`alr`).
|
||||||
|
> More information: <https://alire.ada.dev/docs/#first-steps>.
|
||||||
|
|
||||||
|
- Display top-level help and list all available commands:
|
||||||
|
|
||||||
|
`alr help`
|
||||||
|
|
||||||
|
- Display help for a specific subcommand:
|
||||||
|
|
||||||
|
`alr help {{subcommand}}`
|
||||||
|
|
||||||
|
- Show the rules for how crate names and versions must be formatted:
|
||||||
|
|
||||||
|
`alr help identifiers`
|
||||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
> Adds changed files to the index.
|
> Adds changed files to the index.
|
||||||
> More information: <https://git-scm.com/docs/git-add>.
|
> More information: <https://git-scm.com/docs/git-add>.
|
||||||
|
|
||||||
- Add a file to the index:
|
- Stage a file for a commit:
|
||||||
|
|
||||||
`git add {{path/to/file}}`
|
`git add {{path/to/file}}`
|
||||||
|
|
||||||
@@ -24,9 +24,9 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`git add {{[-u|--update]}}`
|
`git add {{[-u|--update]}}`
|
||||||
|
|
||||||
- Also add ignored files:
|
- Add an ignored file:
|
||||||
|
|
||||||
`git add {{[-f|--force]}}`
|
`git add {{[-f|--force]}} {{path/to/file}}`
|
||||||
|
|
||||||
- Interactively stage parts of files:
|
- Interactively stage parts of files:
|
||||||
|
|
||||||
|
|||||||
42
tldr/linux/apptainer-exec
Normal file
42
tldr/linux/apptainer-exec
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# apptainer exec
|
||||||
|
|
||||||
|
> Execute a command within an Apptainer container.
|
||||||
|
> See also: `apptainer run`, `apptainer shell`.
|
||||||
|
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_exec.html>.
|
||||||
|
|
||||||
|
- Execute a command inside a container:
|
||||||
|
|
||||||
|
`apptainer exec {{path/to/image.sif}} {{command}}`
|
||||||
|
|
||||||
|
- Execute a command with arguments:
|
||||||
|
|
||||||
|
`apptainer exec {{path/to/image.sif}} {{command}} {{arg1 arg2 ...}}`
|
||||||
|
|
||||||
|
- Execute a command with a bind mount from host to container:
|
||||||
|
|
||||||
|
`apptainer exec {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}} {{command}}`
|
||||||
|
|
||||||
|
- Execute a command with environment variables:
|
||||||
|
|
||||||
|
`apptainer exec --env {{variable}}={{value}} {{path/to/image.sif}} {{command}}`
|
||||||
|
|
||||||
|
- Execute a command in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
|
||||||
|
|
||||||
|
`apptainer exec {{[-C|--containall]}} {{path/to/image.sif}} {{command}}`
|
||||||
|
|
||||||
|
- Execute a command with a writable temporary filesystem overlay:
|
||||||
|
|
||||||
|
`apptainer exec --writable-tmpfs {{path/to/image.sif}} {{command}}`
|
||||||
|
|
||||||
|
- Execute a command with NVIDIA GPU support:
|
||||||
|
|
||||||
|
`apptainer exec --nv {{path/to/image.sif}} {{command}}`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`apptainer exec {{[-h|--help]}}`
|
||||||
43
tldr/linux/apptainer-run
Normal file
43
tldr/linux/apptainer-run
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# apptainer run
|
||||||
|
|
||||||
|
> Run the default runscript of an Apptainer container.
|
||||||
|
> The runscript is defined in the `%runscript` section of the container's definition file.
|
||||||
|
> See also: `apptainer exec`, `apptainer shell`.
|
||||||
|
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_run.html>.
|
||||||
|
|
||||||
|
- Run the default runscript of a container:
|
||||||
|
|
||||||
|
`apptainer run {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run with arguments passed to the runscript:
|
||||||
|
|
||||||
|
`apptainer run {{path/to/image.sif}} {{arg1 arg2 ...}}`
|
||||||
|
|
||||||
|
- Run with a bind mount from host to container:
|
||||||
|
|
||||||
|
`apptainer run {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run with environment variables:
|
||||||
|
|
||||||
|
`apptainer run --env {{variable}}={{value}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
|
||||||
|
|
||||||
|
`apptainer run {{[-C|--containall]}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run with a writable temporary filesystem overlay:
|
||||||
|
|
||||||
|
`apptainer run --writable-tmpfs {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run with NVIDIA GPU support:
|
||||||
|
|
||||||
|
`apptainer run --nv {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`apptainer run {{[-h|--help]}}`
|
||||||
22
tldr/linux/apptainer-run-help
Normal file
22
tldr/linux/apptainer-run-help
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# apptainer run-help
|
||||||
|
|
||||||
|
> Display user-defined help for an Apptainer container image.
|
||||||
|
> Help text is defined in the `%help` section of the container's definition file.
|
||||||
|
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_run-help.html>.
|
||||||
|
|
||||||
|
- Display help for a container:
|
||||||
|
|
||||||
|
`apptainer run-help {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Display help for a specific app within a container:
|
||||||
|
|
||||||
|
`apptainer run-help --app {{app_name}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`apptainer run-help {{[-h|--help]}}`
|
||||||
42
tldr/linux/apptainer-shell
Normal file
42
tldr/linux/apptainer-shell
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# apptainer shell
|
||||||
|
|
||||||
|
> Start an interactive shell within an Apptainer container.
|
||||||
|
> See also: `apptainer exec`, `apptainer run`.
|
||||||
|
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_shell.html>.
|
||||||
|
|
||||||
|
- Start an interactive shell inside a container:
|
||||||
|
|
||||||
|
`apptainer shell {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Start a shell with a bind mount from host to container:
|
||||||
|
|
||||||
|
`apptainer shell {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Start a shell with environment variables:
|
||||||
|
|
||||||
|
`apptainer shell --env {{variable}}={{value}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Start a shell in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
|
||||||
|
|
||||||
|
`apptainer shell {{[-C|--containall]}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Start a shell with a writable temporary filesystem overlay:
|
||||||
|
|
||||||
|
`apptainer shell --writable-tmpfs {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Start a shell with NVIDIA GPU support:
|
||||||
|
|
||||||
|
`apptainer shell --nv {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Start a shell using a specific shell program:
|
||||||
|
|
||||||
|
`apptainer shell {{[-s|--shell]}} {{path/to/shell}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`apptainer shell {{[-h|--help]}}`
|
||||||
34
tldr/linux/apptainer-test
Normal file
34
tldr/linux/apptainer-test
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# apptainer test
|
||||||
|
|
||||||
|
> Run the testscript defined in an Apptainer container image.
|
||||||
|
> The testscript is defined in the `%test` section of the container's definition file.
|
||||||
|
> More information: <https://apptainer.org/docs/user/main/cli/apptainer_test.html>.
|
||||||
|
|
||||||
|
- Run the testscript of a container:
|
||||||
|
|
||||||
|
`apptainer test {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run the testscript with a bind mount from host to container:
|
||||||
|
|
||||||
|
`apptainer test {{[-B|--bind]}} {{path/to/source}}:{{path/to/destination}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run the testscript in fully isolated mode (contained filesystem, PID, IPC, and clean environment):
|
||||||
|
|
||||||
|
`apptainer test {{[-C|--containall]}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run the testscript with a writable temporary filesystem overlay:
|
||||||
|
|
||||||
|
`apptainer test --writable-tmpfs {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Run the testscript for a specific app within a container:
|
||||||
|
|
||||||
|
`apptainer test --app {{app_name}} {{path/to/image.sif}}`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`apptainer test {{[-h|--help]}}`
|
||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# cam
|
# cam
|
||||||
|
|
||||||
> Frontend tool for `libcamera`.
|
> Frontend tool for `libcamera`.
|
||||||
|
> See also: `v4l2-ctl`.
|
||||||
> More information: <https://libcamera.org/docs.html>.
|
> More information: <https://libcamera.org/docs.html>.
|
||||||
|
|
||||||
- List available cameras:
|
- List available cameras:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
# v4l2-ctl
|
# v4l2-ctl
|
||||||
|
|
||||||
> Control video devices.
|
> Control video devices.
|
||||||
|
> See also: `cam`.
|
||||||
> More information: <https://manned.org/v4l2-ctl>.
|
> More information: <https://manned.org/v4l2-ctl>.
|
||||||
|
|
||||||
- List all video devices:
|
- List all video devices:
|
||||||
|
|||||||
29
tldr/memray
Normal file
29
tldr/memray
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# memray
|
||||||
|
|
||||||
|
> Profile memory usage of a Python application.
|
||||||
|
> More information: <https://github.com/bloomberg/memray#usage>.
|
||||||
|
|
||||||
|
- Run a Python file and track memory usage:
|
||||||
|
|
||||||
|
`memray run {{path/to/file}}.py`
|
||||||
|
|
||||||
|
- Run a [m]odule and track memory usage:
|
||||||
|
|
||||||
|
`memray run -m {{module_name}}`
|
||||||
|
|
||||||
|
- Specify an output name:
|
||||||
|
|
||||||
|
`memray run {{[-o|--output]}} {{path/to/output_file}}.bin {{path/to/file}}.py`
|
||||||
|
|
||||||
|
- Display a summary of memory usage:
|
||||||
|
|
||||||
|
`memray summary {{path/to/file}}.bin`
|
||||||
|
|
||||||
|
- Generate an HTML flamegraph:
|
||||||
|
|
||||||
|
`memray flamegraph {{path/to/file}}.bin`
|
||||||
Reference in New Issue
Block a user