diff --git a/tldr/alr-help b/tldr/alr-help new file mode 100644 index 00000000..43bb9239 --- /dev/null +++ b/tldr/alr-help @@ -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: . + +- 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` diff --git a/tldr/git-add b/tldr/git-add index a544d116..3f9d77eb 100644 --- a/tldr/git-add +++ b/tldr/git-add @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Adds changed files to the index. > More information: . -- Add a file to the index: +- Stage a file for a commit: `git add {{path/to/file}}` @@ -24,9 +24,9 @@ source: https://github.com/tldr-pages/tldr.git `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: diff --git a/tldr/linux/apptainer-exec b/tldr/linux/apptainer-exec new file mode 100644 index 00000000..b22200fa --- /dev/null +++ b/tldr/linux/apptainer-exec @@ -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: . + +- 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]}}` diff --git a/tldr/linux/apptainer-run b/tldr/linux/apptainer-run new file mode 100644 index 00000000..185e0c36 --- /dev/null +++ b/tldr/linux/apptainer-run @@ -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: . + +- 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]}}` diff --git a/tldr/linux/apptainer-run-help b/tldr/linux/apptainer-run-help new file mode 100644 index 00000000..f50f6578 --- /dev/null +++ b/tldr/linux/apptainer-run-help @@ -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: . + +- 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]}}` diff --git a/tldr/linux/apptainer-shell b/tldr/linux/apptainer-shell new file mode 100644 index 00000000..68bdfefc --- /dev/null +++ b/tldr/linux/apptainer-shell @@ -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: . + +- 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]}}` diff --git a/tldr/linux/apptainer-test b/tldr/linux/apptainer-test new file mode 100644 index 00000000..0a314718 --- /dev/null +++ b/tldr/linux/apptainer-test @@ -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: . + +- 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]}}` diff --git a/tldr/linux/cam b/tldr/linux/cam index 6114f377..0b2a0e4f 100644 --- a/tldr/linux/cam +++ b/tldr/linux/cam @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # cam > Frontend tool for `libcamera`. +> See also: `v4l2-ctl`. > More information: . - List available cameras: diff --git a/tldr/linux/v4l2-ctl b/tldr/linux/v4l2-ctl index d6b73dd1..2ea62706 100644 --- a/tldr/linux/v4l2-ctl +++ b/tldr/linux/v4l2-ctl @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # v4l2-ctl > Control video devices. +> See also: `cam`. > More information: . - List all video devices: diff --git a/tldr/memray b/tldr/memray new file mode 100644 index 00000000..0e485a98 --- /dev/null +++ b/tldr/memray @@ -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: . + +- 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`