diff --git a/tldr/alias b/tldr/alias index 92b3d6db..968f2e6a 100644 --- a/tldr/alias +++ b/tldr/alias @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Create aliases - words that are replaced by a command string. > Aliases expire with the current shell session unless defined in the shell's configuration file, e.g. `~/.bashrc` for Bash or `~/.zshrc` for Zsh. > See also: `unalias`. -> More information: . +> More information: . - List all aliases: diff --git a/tldr/bg b/tldr/bg index f243d697..e58fa03d 100644 --- a/tldr/bg +++ b/tldr/bg @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Resume suspended jobs (e.g. using ``), and keeps them running in the background. > See also: `jobs`, `fg`, `disown`. -> More information: . +> More information: . - Resume the most recently suspended job and run it in the background: diff --git a/tldr/builtin b/tldr/builtin index 2dbb0f2c..47539c1e 100644 --- a/tldr/builtin +++ b/tldr/builtin @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # builtin > Execute shell builtins. -> More information: . +> More information: . - Run a shell builtin: diff --git a/tldr/cd b/tldr/cd index c0fbd2e3..4e955527 100644 --- a/tldr/cd +++ b/tldr/cd @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # cd > Change the current working directory. -> More information: . +> More information: . - Go to the specified directory: diff --git a/tldr/colon b/tldr/colon index 491aa316..8b439832 100644 --- a/tldr/colon +++ b/tldr/colon @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # Colon > Returns a successful exit status code of 0. -> More information: . +> More information: . - Return a successful exit code: diff --git a/tldr/command b/tldr/command index 0e30321a..322b1734 100644 --- a/tldr/command +++ b/tldr/command @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # command > Command forces the shell to execute the program and ignore any functions, builtins and aliases with the same name. -> More information: . +> More information: . - Execute the `ls` program literally, even if an `ls` alias exists: diff --git a/tldr/conda b/tldr/conda index 1d214e1e..8f46a605 100644 --- a/tldr/conda +++ b/tldr/conda @@ -17,11 +17,11 @@ source: https://github.com/tldr-pages/tldr.git `conda info {{[-e|--envs]}}` -- Load an environment: +- Activate an environment: `conda activate {{environment_name}}` -- Unload an environment: +- Deactivate an environment: `conda deactivate` diff --git a/tldr/conda-env b/tldr/conda-env new file mode 100644 index 00000000..02b43505 --- /dev/null +++ b/tldr/conda-env @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# conda env + +> Manage conda environments. +> More information: . + +- Create an environment from an environment file (YAML, TXT, etc.): + +`conda env create {{[-f|--file]}} {{path/to/file}}` + +- Delete an environment and everything in it: + +`conda env remove {{[-n|--name]}} {{environment_name}}` + +- Update an environment based on an environment file: + +`conda env update {{[-f|--file]}} {{path/to/file}} --prune` + +- List all environments: + +`conda env list` + +- View environment details: + +`conda env export` + +- List environment variables: + +`conda env config vars list` + +- Set environment variables: + +`conda env config vars set {{my_var}}={{value}}` diff --git a/tldr/eval b/tldr/eval index 0f0b4ccf..445b4689 100644 --- a/tldr/eval +++ b/tldr/eval @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # eval > Execute arguments as a single command in the current shell and return its result. -> More information: . +> More information: . - Call `echo` with the "foo" argument: diff --git a/tldr/fc b/tldr/fc index 56d9adf1..867bb12a 100644 --- a/tldr/fc +++ b/tldr/fc @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # fc > Open the most recent command for editing and then run it. -> More information: . +> More information: . - Open the last command in the default system editor and run it after editing: diff --git a/tldr/fg b/tldr/fg index 34d1ca70..7762092a 100644 --- a/tldr/fg +++ b/tldr/fg @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Run jobs in foreground. > See also: `jobs`, `bg`, `disown`. -> More information: . +> More information: . - Bring most recently suspended or running background job to foreground: diff --git a/tldr/kubectl-api-resources b/tldr/kubectl-api-resources new file mode 100644 index 00000000..d113bb06 --- /dev/null +++ b/tldr/kubectl-api-resources @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl api-resources + +> Print the supported API resources on the server. +> More information: . + +- Print the supported API resources: + +`kubectl api-resources` + +- Print the supported API resources with more information: + +`kubectl api-resources {{[-o|--output]}} wide` + +- Print the supported API resources sorted by a column: + +`kubectl api-resources --sort-by {{name}}` + +- Print the supported namespaced resources: + +`kubectl api-resources --namespaced` + +- Print the supported non-namespaced resources: + +`kubectl api-resources --namespaced=false` + +- Print the supported API resources with a specific API group: + +`kubectl api-resources --api-group={{api_group}}` diff --git a/tldr/kubectl-autoscale b/tldr/kubectl-autoscale new file mode 100644 index 00000000..c282d691 --- /dev/null +++ b/tldr/kubectl-autoscale @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl autoscale + +> Create an autoscaler to intelligently scale pod count based on kubernetes cluster demands. +> More information: . + +- Auto scale a deployment with no target CPU utilization specified: + +`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --min={{min_replicas}} --max={{max_replicas}}` + +- Auto scale a deployment with target CPU utilization: + +`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --max={{max_replicas}} --cpu-percent={{target_cpu}}` diff --git a/tldr/let b/tldr/let index 2f333e73..8fcf8c83 100644 --- a/tldr/let +++ b/tldr/let @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Evaluate arithmetic expressions in shell. > Supports variables, operators, and conditional expressions. -> More information: . +> More information: . - Evaluate a simple arithmetic expression: diff --git a/tldr/linux/collectd b/tldr/linux/collectd index 10be20c6..ff92bea5 100644 --- a/tldr/linux/collectd +++ b/tldr/linux/collectd @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # collectd > System statistics collection daemon. -> More information: . +> More information: . - Test the configuration file and then exit: diff --git a/tldr/linux/e2fsck b/tldr/linux/e2fsck index c77d9e7a..a758f374 100644 --- a/tldr/linux/e2fsck +++ b/tldr/linux/e2fsck @@ -20,6 +20,10 @@ source: https://github.com/tldr-pages/tldr.git `sudo e2fsck -c {{/dev/sdXN}}` +- Force checking even if the filesystem seems clean: + +`sudo e2fsck -f {{/dev/sdXN}}` + - Perform an exhaustive, non-destructive read-write test for bad blocks and blacklist them: `sudo e2fsck -fccky {{/dev/sdXN}}` diff --git a/tldr/linux/resize2fs b/tldr/linux/resize2fs index 4778da26..25bf240a 100644 --- a/tldr/linux/resize2fs +++ b/tldr/linux/resize2fs @@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git > Does not resize the underlying partition. The filesystem may have to be unmounted first, read the man page for more details. > More information: . -- Automatically resize a filesystem: +- Automatically resize a filesystem to its maximum possible size: `resize2fs {{/dev/sdXN}}` diff --git a/tldr/osx/orb b/tldr/osx/orb new file mode 100644 index 00000000..94c7b1c8 --- /dev/null +++ b/tldr/osx/orb @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, osx] +source: https://github.com/tldr-pages/tldr.git +--- +# orb + +> Interface for OrbStack, a fast and lightweight container and virtual machine runtime for macOS. +> Provides Docker-compatible commands and Linux VM management. +> More information: . + +- List all containers and VMs: + +`orb list` + +- Create and start a Linux virtual machine: + +`orb create {{vm_name}}` + +- Create a VM with a specific Linux distribution: + +`orb create {{vm_name}} {{ubuntu|fedora|arch|debian}}` + +- Start or stop a virtual machine: + +`orb {{start|stop}} {{vm_name}}` + +- Connect to a VM via SSH: + +`orb ssh {{vm_name}}` + +- Execute a command in a VM: + +`orb exec {{vm_name}} {{command}}` + +- Delete a virtual machine: + +`orb delete {{vm_name}}` + +- Show system status and resource usage: + +`orb status` diff --git a/tldr/readonly b/tldr/readonly index d6b657c1..e59045c1 100644 --- a/tldr/readonly +++ b/tldr/readonly @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # readonly > Set read-only shell variables. -> More information: . +> More information: . - Set a read-only variable: diff --git a/tldr/set b/tldr/set index 34cfd5b2..0f046c5d 100644 --- a/tldr/set +++ b/tldr/set @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # set > Toggle shell options or set the values of positional parameters. -> More information: . +> More information: . - Display the names and values of shell variables: diff --git a/tldr/shift b/tldr/shift index 3ed038b8..66bd011e 100644 --- a/tldr/shift +++ b/tldr/shift @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # shift > Move positional parameters. -> More information: . +> More information: . - Remove the first positional parameter: diff --git a/tldr/sleep b/tldr/sleep index 901d6360..943af408 100644 --- a/tldr/sleep +++ b/tldr/sleep @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # sleep > Delay for a specified amount of time. -> More information: . +> More information: . - Delay in seconds: diff --git a/tldr/source b/tldr/source index fbda8762..16452067 100644 --- a/tldr/source +++ b/tldr/source @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # source > Execute commands from a file in the current shell. -> More information: . +> More information: . - Evaluate contents of a given file: diff --git a/tldr/umask b/tldr/umask index a5445f95..74bd41d1 100644 --- a/tldr/umask +++ b/tldr/umask @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # umask > Manage the read/write/execute permissions that are masked out (i.e. restricted) for newly created files by the user. -> More information: . +> More information: . - Display the current mask in octal notation: diff --git a/tldr/unalias b/tldr/unalias index 0a70439f..8c77c496 100644 --- a/tldr/unalias +++ b/tldr/unalias @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Remove aliases. > See also: `alias`. -> More information: . +> More information: . - Remove an alias: diff --git a/tldr/unset b/tldr/unset index 91d25b61..5535a261 100644 --- a/tldr/unset +++ b/tldr/unset @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # unset > Remove shell variables or functions. -> More information: . +> More information: . - Remove the variable `foo`, or if the variable doesn't exist, remove the function `foo`: diff --git a/tldr/wait b/tldr/wait index 0121a87e..1585aa86 100644 --- a/tldr/wait +++ b/tldr/wait @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Wait for a process to complete before proceeding. > See also: `ps` to view information about running processes. -> More information: . +> More information: . - Wait for a process to finish given its process ID (PID) and return its exit status: diff --git a/tldr/wget b/tldr/wget index ad6f7fbd..f8917ea7 100644 --- a/tldr/wget +++ b/tldr/wget @@ -19,15 +19,15 @@ source: https://github.com/tldr-pages/tldr.git - Download a single web page and all its resources with 3-second intervals between requests (scripts, stylesheets, images, etc.): -`wget {{[-p|--page-requisites]}} {{[-k|--convert-links]}} {{[-w|--wait]}} 3 {{https://example.com/somepage.html}}` +`wget {{[-pkw|--page-requisites --convert-links --wait]}} 3 {{https://example.com/some_page.html}}` - Download all listed files within a directory and its sub-directories (does not download embedded page elements): -`wget {{[-m|--mirror]}} {{[-np|--no-parent]}} {{https://example.com/somepath/}}` +`wget {{[-mnp|--mirror --no-parent]}} {{https://example.com/some_path/}}` - Limit the download speed and the number of connection retries: -`wget --limit-rate {{300k}} {{[-t|--tries]}} {{100}} {{https://example.com/somepath/}}` +`wget --limit-rate {{300k}} {{[-t|--tries]}} {{100}} {{https://example.com/some_path/}}` - Download a file from an HTTP server using Basic Auth (also works for FTP): @@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git - Download all URLs stored in a text file to a specific directory: -`wget {{[-P|--directory-prefix]}} {{path/to/directory}} {{[-i|--input-file]}} {{URLs.txt}}` +`wget {{[-P|--directory-prefix]}} {{path/to/directory}} {{[-i|--input-file]}} {{path/to/URLs.txt}}` diff --git a/tldr/while b/tldr/while index a3b31d29..01075fff 100644 --- a/tldr/while +++ b/tldr/while @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # while > Simple shell loop that repeats while the return value remains zero. -> More information: . +> More information: . - Read `stdin` and perform an action on every line: diff --git a/tldr/xargs b/tldr/xargs index 4e323aad..6c714bd2 100644 --- a/tldr/xargs +++ b/tldr/xargs @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Execute a command with piped arguments coming from another command, a file, etc. > The input is treated as a single block of text and split into separate pieces on spaces, tabs, newlines and end-of-file. -> More information: . +> More information: . - Run a command using the input data as arguments: