mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 21:44:00 +00:00
Update cheatsheets
This commit is contained in:
21
tldr/,
Normal file
21
tldr/,
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# Comma
|
||||
|
||||
> Run commands without installing them.
|
||||
> More information: <https://github.com/nix-community/comma>.
|
||||
|
||||
- Run a command:
|
||||
|
||||
`, {{command -with -flags}}`
|
||||
|
||||
- Add a command to a child shell:
|
||||
|
||||
`, {{[-s|--shell]}} {{command}}`
|
||||
|
||||
- Clear the cache:
|
||||
|
||||
`, {{[-e|--empty-cache]}}`
|
||||
25
tldr/browsh
Normal file
25
tldr/browsh
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# browsh
|
||||
|
||||
> View webpages on the terminal using a Firefox backend.
|
||||
> More information: <https://www.brow.sh/>.
|
||||
|
||||
- Start browsh:
|
||||
|
||||
`browsh`
|
||||
|
||||
- Start browsh in a specific webpage:
|
||||
|
||||
`browsh --startup-url {{URL}}`
|
||||
|
||||
- Focus URL bar:
|
||||
|
||||
`<Ctrl l>`
|
||||
|
||||
- Exit browsh:
|
||||
|
||||
`<Ctrl q>`
|
||||
@@ -28,3 +28,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Disable automatic startup after login into text console:
|
||||
|
||||
`byobu-disable`
|
||||
|
||||
- Detach from `byobu`:
|
||||
|
||||
`<F6>`
|
||||
|
||||
- Kill a window:
|
||||
|
||||
`<Ctrl a><k>`
|
||||
|
||||
21
tldr/carbonyl
Normal file
21
tldr/carbonyl
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# carbonyl
|
||||
|
||||
> View webpages on the terminal using a Chromium backend.
|
||||
> More information: <https://github.com/fathyb/carbonyl>.
|
||||
|
||||
- Open an `about:blank` page:
|
||||
|
||||
`carbonyl`
|
||||
|
||||
- Open a webpage:
|
||||
|
||||
`carbonyl {{https://example.com}}`
|
||||
|
||||
- Exit carbonyl:
|
||||
|
||||
`<Ctrl c>`
|
||||
12
tldr/comma
Normal file
12
tldr/comma
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# comma
|
||||
|
||||
> This command is an alias of `,`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr ,`
|
||||
12
tldr/cpio
12
tldr/cpio
@@ -9,14 +9,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Supports the following archive formats: cpio's custom binary, old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar.
|
||||
> More information: <https://www.gnu.org/software/cpio>.
|
||||
|
||||
- Take a list of file names from `stdin` and add them [o]nto an archive in cpio's binary format:
|
||||
- Take a list of file names from `stdin` and add them onto an archive (copy-[o]ut) in cpio's binary forma:
|
||||
|
||||
`echo "{{path/to/file1 path/to/file2 ...}}" | cpio -o > {{archive.cpio}}`
|
||||
`echo "{{path/to/file1 path/to/file2 ...}}" | cpio {{[-o|--create]}} > {{archive.cpio}}`
|
||||
|
||||
- Copy all files and directories in a directory and add them [o]nto an archive, in [v]erbose mode:
|
||||
- Copy all files and directories in a directory and add them onto an archive (copy-[o]ut), in verbose mode:
|
||||
|
||||
`find {{path/to/directory}} | cpio -ov > {{archive.cpio}}`
|
||||
`find {{path/to/directory}} | cpio {{[-ov|--create --verbose]}} > {{archive.cpio}}`
|
||||
|
||||
- P[i]ck all files from an archive, generating [d]irectories where needed, in [v]erbose mode:
|
||||
- Pick all files from an archive (copy-[i]n), generating directories where needed, in verbose mode:
|
||||
|
||||
`cpio -idv < {{archive.cpio}}`
|
||||
`cpio {{[-idv|--extract --make-directories --verbose]}} < {{archive.cpio}}`
|
||||
|
||||
12
tldr/cut
12
tldr/cut
@@ -12,14 +12,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`{{command}} | cut --{{characters|fields}} {{1|1,10|1-10|1-|-10}}`
|
||||
|
||||
- Print a [f]ield range of each line with a specific [d]elimiter:
|
||||
- Print a field range of each line with a specific delimiter:
|
||||
|
||||
`{{command}} | cut --delimiter "{{delimiter}}" --fields {{1|1,10|1-10|1-|-10}}`
|
||||
`{{command}} | cut {{[-d|--delimiter]}} "{{delimiter}}" {{[-f|--fields]}} {{1|1,10|1-10|1-|-10}}`
|
||||
|
||||
- Print a [c]haracter range of each line of the specific file:
|
||||
- Print a character range of each line of the specific file:
|
||||
|
||||
`cut --characters {{1}} {{path/to/file}}`
|
||||
`cut {{[-c|--characters]}} {{1}} {{path/to/file}}`
|
||||
|
||||
- Print specific [f]ields of `NUL` terminated lines (e.g. as in `find . -print0`) instead of newlines:
|
||||
- Print specific fields of `NUL` terminated lines (e.g. as in `find . -print0`) instead of newlines:
|
||||
|
||||
`{{command}} | cut --zero-terminated --fields {{1}}`
|
||||
`{{command}} | cut {{[-z|--zero-terminated]}} {{[-f|--fields]}} {{1}}`
|
||||
|
||||
@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all Docker containers (running and stopped):
|
||||
|
||||
`docker ps --all`
|
||||
`docker ps {{[-a|--all]}}`
|
||||
|
||||
- Start a container from an image, with a custom name:
|
||||
|
||||
@@ -29,9 +29,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`docker images`
|
||||
|
||||
- Open an [i]nteractive [t]ty with Bourne shell (`sh`) inside a running container:
|
||||
- Open an interactive tty with Bourne shell (`sh`) inside a running container:
|
||||
|
||||
`docker exec -it {{container_name}} {{sh}}`
|
||||
`docker exec {{[-it|--interactive --tty]}} {{container_name}} {{sh}}`
|
||||
|
||||
- Remove stopped containers:
|
||||
|
||||
@@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Fetch and follow the logs of a container:
|
||||
|
||||
`docker logs -f {{container_name}}`
|
||||
`docker logs {{[-f|--follow]}} {{container_name}}`
|
||||
|
||||
@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enter an interactive shell session on an already-running container:
|
||||
|
||||
`docker exec --interactive --tty {{container_name}} {{/bin/bash}}`
|
||||
`docker exec {{[-it|--interactive --tty]}} {{container_name}} {{/bin/bash}}`
|
||||
|
||||
- Run a command in the background (detached) on a running container:
|
||||
|
||||
`docker exec --detach {{container_name}} {{command}}`
|
||||
`docker exec {{[-d|--detach]}} {{container_name}} {{command}}`
|
||||
|
||||
- Select the working directory for a given command to execute into:
|
||||
|
||||
`docker exec --interactive --tty --workdir {{path/to/directory}} {{container_name}} {{command}}`
|
||||
`docker exec {{[-it|--interactive --tty]}} {{[-w|--workdir]}} {{path/to/directory}} {{container_name}} {{command}}`
|
||||
|
||||
- Run a command in background on existing container but keep `stdin` open:
|
||||
|
||||
`docker exec --interactive --detach {{container_name}} {{command}}`
|
||||
`docker exec {{[-i|--interactive]}} {{[-d|--detach]}} {{container_name}} {{command}}`
|
||||
|
||||
- Set an environment variable in a running Bash session:
|
||||
|
||||
`docker exec --interactive --tty --env {{variable_name}}={{value}} {{container_name}} {{/bin/bash}}`
|
||||
`docker exec {{[-it|--interactive --tty]}} {{[-e|--env]}} {{variable_name}}={{value}} {{container_name}} {{/bin/bash}}`
|
||||
|
||||
- Run a command as a specific user:
|
||||
|
||||
`docker exec --user {{user}} {{container_name}} {{command}}`
|
||||
`docker exec {{[-u|--user]}} {{user}} {{container_name}} {{command}}`
|
||||
|
||||
@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all Docker images including intermediates:
|
||||
|
||||
`docker images --all`
|
||||
`docker images {{[-a|--all]}}`
|
||||
|
||||
- List the output in quiet mode (only numeric IDs):
|
||||
|
||||
`docker images --quiet`
|
||||
`docker images {{[-q|--quiet]}}`
|
||||
|
||||
- List all Docker images not used by any container:
|
||||
|
||||
`docker images --filter dangling=true`
|
||||
`docker images {{[-f|--filter]}} dangling=true`
|
||||
|
||||
- List images that contain a substring in their name:
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print logs and follow them:
|
||||
|
||||
`docker logs -f {{container_name}}`
|
||||
`docker logs {{[-f|--follow]}} {{container_name}}`
|
||||
|
||||
- Print last 5 lines:
|
||||
|
||||
`docker logs {{container_name}} --tail {{5}}`
|
||||
`docker logs {{container_name}} {{[-n|--tail]}} {{5}}`
|
||||
|
||||
- Print logs and append them with timestamps:
|
||||
|
||||
`docker logs -t {{container_name}}`
|
||||
`docker logs {{[-t|--timestamps]}} {{container_name}}`
|
||||
|
||||
- Print logs from a certain point in time of container execution (i.e. 23m, 10s, 2013-01-02T13:23:37):
|
||||
|
||||
|
||||
@@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all Docker containers (running and stopped):
|
||||
|
||||
`docker ps --all`
|
||||
`docker ps {{[-a|--all]}}`
|
||||
|
||||
- Show the latest created container (includes all states):
|
||||
|
||||
`docker ps --latest`
|
||||
`docker ps {{[-l|--latest]}}`
|
||||
|
||||
- Filter containers that contain a substring in their name:
|
||||
|
||||
`docker ps --filter "name={{name}}"`
|
||||
`docker ps {{[-f|--filter]}} "name={{name}}"`
|
||||
|
||||
- Filter containers that share a given image as an ancestor:
|
||||
|
||||
`docker ps --filter "ancestor={{image}}:{{tag}}"`
|
||||
`docker ps {{[-f|--filter]}} "ancestor={{image}}:{{tag}}"`
|
||||
|
||||
- Filter containers by exit status code:
|
||||
|
||||
`docker ps --all --filter "exited={{code}}"`
|
||||
`docker ps {{[-a|--all]}} {{[-f|--filter]}} "exited={{code}}"`
|
||||
|
||||
- Filter containers by status (created, running, removing, paused, exited and dead):
|
||||
|
||||
`docker ps --filter "status={{status}}"`
|
||||
`docker ps {{[-f|--filter]}} "status={{status}}"`
|
||||
|
||||
- Filter containers that mount a specific volume or have a volume mounted in a specific path:
|
||||
|
||||
`docker ps --filter "volume={{path/to/directory}}" --format "table {{.ID}} {{.Image}} {{.Names}} {{.Mounts}}"`
|
||||
`docker ps {{[-f|--filter]}} "volume={{path/to/directory}}" --format "table {{.ID}} {{.Image}} {{.Names}} {{.Mounts}}"`
|
||||
|
||||
@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download a specific Docker image in quiet mode:
|
||||
|
||||
`docker pull --quiet {{image}}:{{tag}}`
|
||||
`docker pull {{[-q|--quiet]}} {{image}}:{{tag}}`
|
||||
|
||||
- Download all tags of a specific Docker image:
|
||||
|
||||
`docker pull --all-tags {{image}}`
|
||||
`docker pull {{[-a|--all-tags]}} {{image}}`
|
||||
|
||||
- Download a Docker images for a specific platform, e.g. linux/amd64:
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`docker pull --help`
|
||||
`docker pull {{[-h|--help]}}`
|
||||
|
||||
@@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Force remove a container:
|
||||
|
||||
`docker rm --force {{container1 container2 ...}}`
|
||||
`docker rm {{[-f|--force]}} {{container1 container2 ...}}`
|
||||
|
||||
- Remove a container and its volumes:
|
||||
|
||||
`docker rm --volumes {{container}}`
|
||||
`docker rm {{[-v|--volumes]}} {{container}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`docker rm --help`
|
||||
`docker rm {{[-h|--help]}}`
|
||||
|
||||
@@ -14,23 +14,23 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run command in a new container in background and display its ID:
|
||||
|
||||
`docker run --detach {{image}} {{command}}`
|
||||
`docker run {{[-d|--detach]}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a one-off container in interactive mode and pseudo-TTY:
|
||||
|
||||
`docker run --rm --interactive --tty {{image}} {{command}}`
|
||||
`docker run --rm {{[-i|--interactive]}} {{[-t|--tty]}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container with passed environment variables:
|
||||
|
||||
`docker run --env '{{variable}}={{value}}' --env {{variable}} {{image}} {{command}}`
|
||||
`docker run {{[-e|--env]}} '{{variable}}={{value}}' {{[-e|--env]}} {{variable}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container with bind mounted volumes:
|
||||
|
||||
`docker run --volume {{/path/to/host_path}}:{{/path/to/container_path}} {{image}} {{command}}`
|
||||
`docker run {{[-v|--volume]}} {{/path/to/host_path}}:{{/path/to/container_path}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container with published ports:
|
||||
|
||||
`docker run --publish {{host_port}}:{{container_port}} {{image}} {{command}}`
|
||||
`docker run {{[-p|--publish]}} {{host_port}}:{{container_port}} {{image}} {{command}}`
|
||||
|
||||
- Run command in a new container overwriting the entrypoint of the image:
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Start a container, attaching `stdout` and `stderr` and forwarding signals:
|
||||
|
||||
`docker start --attach {{container}}`
|
||||
`docker start {{[-a|--attach]}} {{container}}`
|
||||
|
||||
- Start one or more containers:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Apply and commit changes following a remote patch file:
|
||||
|
||||
`curl -L {{https://example.com/file.patch}} | git apply`
|
||||
`curl {{[-L|--location]}} {{https://example.com/file.patch}} | git apply`
|
||||
|
||||
- Abort the process of applying a patch file:
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clone only the `.git` directory of an existing repository:
|
||||
|
||||
`git clone --no-checkout {{remote_repository_location}}`
|
||||
`git clone {{[-n|--no-checkout]}} {{remote_repository_location}}`
|
||||
|
||||
- Clone a local repository:
|
||||
|
||||
`git clone --local {{path/to/local/repository}}`
|
||||
`git clone {{[-l|--local]]} {{path/to/local/repository}}`
|
||||
|
||||
- Clone quietly:
|
||||
|
||||
`git clone --quiet {{remote_repository_location}}`
|
||||
`git clone {{[-q|--quiet]}} {{remote_repository_location}}`
|
||||
|
||||
- Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time):
|
||||
|
||||
@@ -34,8 +34,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clone an existing repository only fetching a specific branch:
|
||||
|
||||
`git clone --branch {{name}} --single-branch {{remote_repository_location}}`
|
||||
`git clone {{[-b|--branch]}} {{name}} --single-branch {{remote_repository_location}}`
|
||||
|
||||
- Clone an existing repository using a specific SSH command:
|
||||
|
||||
`git clone --config core.sshCommand="{{ssh -i path/to/private_ssh_key}}" {{remote_repository_location}}`
|
||||
`git clone {{[-c|--config]}} core.sshCommand="{{ssh -i path/to/private_ssh_key}}" {{remote_repository_location}}`
|
||||
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Send changes from a specific local branch to its remote counterpart, and set the remote one as the default push/pull target of the local one:
|
||||
|
||||
`git push -u {{remote_name}} {{local_branch}}`
|
||||
`git push {{[-u|--set-upstream]}} {{remote_name}} {{local_branch}}`
|
||||
|
||||
- Send changes from a specific local branch to a specific remote branch:
|
||||
|
||||
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete a branch in a remote repository:
|
||||
|
||||
`git push {{remote_name}} --delete {{remote_branch}}`
|
||||
`git push {{remote_name}} {{[-d|--delete]}} {{remote_branch}}`
|
||||
|
||||
- Remove remote branches that don't have a local counterpart:
|
||||
|
||||
|
||||
@@ -14,15 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show the network address of the host name:
|
||||
|
||||
`hostname -i`
|
||||
|
||||
- Show all network addresses of the host:
|
||||
|
||||
`hostname -I`
|
||||
`hostname {{[-i|--ip-addresses]}}`
|
||||
|
||||
- Show the FQDN (Fully Qualified Domain Name):
|
||||
|
||||
`hostname --fqdn`
|
||||
`hostname {{[-f|--fqdn]}}`
|
||||
|
||||
- Set current host name:
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`killall {{process_name}}`
|
||||
|
||||
- [l]ist available signal names (to be used without the 'SIG' prefix):
|
||||
- List available signal names (to be used without the 'SIG' prefix):
|
||||
|
||||
`killall -l`
|
||||
`killall {{[-l|--list]}}`
|
||||
|
||||
- Interactively ask for confirmation before termination:
|
||||
|
||||
`killall -i {{process_name}}`
|
||||
`killall {{[-i|--interactive]}} {{process_name}}`
|
||||
|
||||
- Terminate a process using the SIGINT (interrupt) signal, which is the same signal sent by pressing `<Ctrl c>`:
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Run and manage telephone and exchange (phone) server instances.
|
||||
> More information: <https://docs.asterisk.org>.
|
||||
|
||||
- [R]econnect to a running server, and turn on logging 3 levels of [v]erbosity:
|
||||
- [r]econnect to a running server, and turn on logging 3 levels of [v]erbosity:
|
||||
|
||||
`asterisk -r -vvv`
|
||||
|
||||
- [R]econnect to a running server, run a single command, and return:
|
||||
- [r]econnect to a running server, run a single command, and return:
|
||||
|
||||
`asterisk -r -x "{{command}}"`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`cal {{[-3|--three]}}`
|
||||
|
||||
- Display the whole calendar for the current [y]ear:
|
||||
- Display the whole calendar for the current year:
|
||||
|
||||
`cal {{[-y|--year]}}`
|
||||
|
||||
|
||||
@@ -12,24 +12,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run a command with the given scheduling class and priority:
|
||||
|
||||
`ionice -c {{scheduling_class}} -n {{priority}} {{command}}`
|
||||
`ionice {{[-c|--class]}} {{scheduling_class}} {{[-n|--classdata]}} {{priority}} {{command}}`
|
||||
|
||||
- Set I/O scheduling [c]lass of a running process with a specific [p]id, [P]gid or [u]id:
|
||||
- Set I/O scheduling class of a running process with a specific [p]id, [P]gid or [u]id:
|
||||
|
||||
`ionice -c {{scheduling_class}} -{{p|P|u}} {{id}}`
|
||||
`ionice {{[-c|--class]}} {{scheduling_class}} -{{p|P|u}} {{id}}`
|
||||
|
||||
- Run a command with custom I/O scheduling [c]lass and priority:
|
||||
- Run a command with custom I/O scheduling class and priority:
|
||||
|
||||
`ionice -c {{scheduling_class}} -n {{priority}} {{command}}`
|
||||
`ionice {{[-c|--class]}} {{scheduling_class}} {{[-n|--classdata]}} {{priority}} {{command}}`
|
||||
|
||||
- Ignore failure to set the requested priority:
|
||||
|
||||
`ionice -t -n {{priority}} -p {{pid}}`
|
||||
`ionice {{[-t|--ignore]}} {{[-n|--classdata]}} {{priority}} {{[-p|--pid]}} {{pid}}`
|
||||
|
||||
- Run the command even in case it was not possible to set the desired priority (this can happen due to insufficient privileges or an old kernel version):
|
||||
|
||||
`ionice -t -n {{priority}} -p {{pid}}`
|
||||
`ionice {{[-t|--ignore]}} {{[-n|--classdata]}} {{priority}} {{[-p|--pid]}} {{pid}}`
|
||||
|
||||
- Print the I/O scheduling class and priority of a running process:
|
||||
|
||||
`ionice -p {{pid}}`
|
||||
`ionice {{[-p|--pid]}} {{pid}}`
|
||||
|
||||
@@ -17,17 +17,17 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`kde-builder {{component_name}}`
|
||||
|
||||
- Compile a component without updating its local code and without compiling its [D]ependencies:
|
||||
- Compile a component without updating its local code and without compiling its dependencies:
|
||||
|
||||
`kde-builder --no-src --no-include-dependencies {{component_name}}`
|
||||
`kde-builder {{[-S|--no-src]}} {{[-D|--no-include-dependencies]}} {{component_name}}`
|
||||
|
||||
- [r]efresh the build directories before compiling:
|
||||
- Refresh the build directories before compiling:
|
||||
|
||||
`kde-builder --refresh-build {{component_name}}`
|
||||
`kde-builder {{[-r|--refresh-build]}} {{component_name}}`
|
||||
|
||||
- Resume compilation from a specific dependency:
|
||||
|
||||
`kde-builder --resume-from {{dependency_component}} {{component_name}}`
|
||||
`kde-builder {{[-f|--resume-from]}} {{dependency_component}} {{component_name}}`
|
||||
|
||||
- Run a component with a specified executable name:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print all properties of a specific session:
|
||||
|
||||
`loginctl show-session {{session_id}} --all`
|
||||
`loginctl show-session {{session_id}} {{[-a|--all]}}`
|
||||
|
||||
- Print all properties of a specific user:
|
||||
|
||||
@@ -22,11 +22,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print a specific property of a user:
|
||||
|
||||
`loginctl show-user {{username}} --property {{property_name}}`
|
||||
`loginctl show-user {{username}} {{[-p|--property]}} {{property_name}}`
|
||||
|
||||
- Execute a `loginctl` operation on a remote host:
|
||||
|
||||
`loginctl list-users -H {{hostname}}`
|
||||
`loginctl list-users {{[-H|--host]}} {{hostname}}`
|
||||
|
||||
- Log a user out on all of their sessions:
|
||||
|
||||
|
||||
@@ -14,24 +14,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all configuration files that will be used by the PipeWire PulseAudio server:
|
||||
|
||||
`pw-config --name pipewire-pulse.conf`
|
||||
`pw-config {{[-n|--name]}} pipewire-pulse.conf`
|
||||
|
||||
- List all configuration sections used by the PipeWire PulseAudio server:
|
||||
|
||||
`pw-config --name pipewire-pulse.conf list`
|
||||
`pw-config {{[-n|--name]}} pipewire-pulse.conf list`
|
||||
|
||||
- List the `context.properties` fragments used by the JACK clients:
|
||||
|
||||
`pw-config --name jack.conf list context.properties`
|
||||
`pw-config {{[-n|--name]}} jack.conf list context.properties`
|
||||
|
||||
- List the merged `context.properties` used by the JACK clients:
|
||||
|
||||
`pw-config --name jack.conf merge context.properties`
|
||||
`pw-config {{[-n|--name]}} jack.conf merge context.properties`
|
||||
|
||||
- List the merged `context.modules` used by the PipeWire server and [r]eformat:
|
||||
- List the merged `context.modules` used by the PipeWire server and reformat:
|
||||
|
||||
`pw-config --name pipewire.conf --recurse merge context.modules`
|
||||
`pw-config {{[-n|--name]}} pipewire.conf {{[-r|--recurse]}} merge context.modules`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pw-config --help`
|
||||
`pw-config {{[-h|--help]}}`
|
||||
|
||||
@@ -17,18 +17,18 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pw-dump {{object_id}}`
|
||||
|
||||
- Dump the current state [m]onitoring changes, printing it again:
|
||||
- Dump the current state monitoring changes, printing it again:
|
||||
|
||||
`pw-dump --monitor`
|
||||
`pw-dump {{[-m|--monitor]}}`
|
||||
|
||||
- Dump the current state of a [r]emote instance to a file:
|
||||
- Dump the current state of a remote instance to a file:
|
||||
|
||||
`pw-dump --remote {{remote_name}} > {{path/to/dump_file.json}}`
|
||||
`pw-dump {{[-r|--remote]}} {{remote_name}} > {{path/to/dump_file.json}}`
|
||||
|
||||
- Set a [C]olor configuration:
|
||||
- Set a color configuration:
|
||||
|
||||
`pw-dump --color {{never|always|auto}}`
|
||||
`pw-dump {{[-C|--color]}} {{never|always|auto}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pw-dump --help`
|
||||
`pw-dump {{[-h|--help]}}`
|
||||
|
||||
@@ -12,11 +12,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`shutdown -h now`
|
||||
|
||||
- [r]eboot immediately:
|
||||
- Reboot immediately:
|
||||
|
||||
`shutdown {{[-r|--reboot]}} now`
|
||||
|
||||
- [r]eboot in 5 minutes:
|
||||
- Reboot in 5 minutes:
|
||||
|
||||
`shutdown {{[-r|--reboot]}} +{{5}} &`
|
||||
|
||||
|
||||
17
tldr/linux/systemctl-enable
Normal file
17
tldr/linux/systemctl-enable
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl enable
|
||||
|
||||
> Enable systemd services.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#enable%20UNIT%E2%80%A6>.
|
||||
|
||||
- Enable a service to run on boot:
|
||||
|
||||
`systemctl enable {{unit}}`
|
||||
|
||||
- Enable a service to run on boot and start it now:
|
||||
|
||||
`systemctl enable {{unit}} --now`
|
||||
@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Plot a dependency graph and convert it to an SVG file:
|
||||
|
||||
`systemd-analyze dot | dot -T{{svg}} > {{path/to/file.svg}}`
|
||||
`systemd-analyze dot | dot -T {{svg}} > {{path/to/file.svg}}`
|
||||
|
||||
- Show security scores of running units:
|
||||
|
||||
|
||||
17
tldr/linux/systemd-disable
Normal file
17
tldr/linux/systemd-disable
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl disable
|
||||
|
||||
> Disable systemd services.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#disable%20UNIT%E2%80%A6>.
|
||||
|
||||
- Stop a service from running on boot:
|
||||
|
||||
`systemctl disable {{unit}}`
|
||||
|
||||
- Stop a service from running on boot and stop its current execution:
|
||||
|
||||
`systemctl disable {{unit}} --now`
|
||||
17
tldr/linux/ubuntu-drivers
Normal file
17
tldr/linux/ubuntu-drivers
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ubuntu-drivers
|
||||
|
||||
> Install drivers on Ubuntu.
|
||||
> More information: <https://documentation.ubuntu.com/server/how-to/graphics/install-nvidia-drivers/index.html>.
|
||||
|
||||
- List available drivers for the current hardware:
|
||||
|
||||
`sudo ubuntu-drivers list`
|
||||
|
||||
- Install drivers for detected hardware:
|
||||
|
||||
`sudo ubuntu-drivers install`
|
||||
@@ -8,26 +8,26 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> X11 selection and clipboard manipulation tool.
|
||||
> More information: <https://manned.org/xsel>.
|
||||
|
||||
- Use a command's output as input of the clip[b]oard (equivalent to `<Ctrl c>`):
|
||||
- Use a command's output as input of the clipboard (equivalent to `<Ctrl c>`):
|
||||
|
||||
`echo 123 | xsel -ib`
|
||||
`echo 123 | xsel {{[-ib|--input --clipboard]}}`
|
||||
|
||||
- Use the contents of a file as input of the clipboard:
|
||||
|
||||
`cat {{path/to/file}} | xsel -ib`
|
||||
`cat {{path/to/file}} | xsel {{[-ib|--input --clipboard]}}`
|
||||
|
||||
- Output the clipboard's contents into the terminal (equivalent to `<Ctrl v>`):
|
||||
|
||||
`xsel -ob`
|
||||
`xsel {{[-ob|--output --clipboard]}}`
|
||||
|
||||
- Output the clipboard's contents into a file:
|
||||
|
||||
`xsel -ob > {{path/to/file}}`
|
||||
`xsel {{[-ob|--output --clipboard]}} > {{path/to/file}}`
|
||||
|
||||
- Clear the clipboard:
|
||||
|
||||
`xsel -cb`
|
||||
`xsel {{[-cb|--clear --clipboard]}}`
|
||||
|
||||
- Output the X11 primary selection's contents into the terminal (equivalent to a mouse `<MiddleClick>`):
|
||||
|
||||
`xsel -op`
|
||||
`xsel {{[-op|--output --primary]}}`
|
||||
|
||||
@@ -29,7 +29,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`zip {{[-r|--recurse-paths]}} {{[-e|--encrypt]}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
||||
|
||||
- Archive files/directories to a multi-part [s]plit Zip archive (e.g. 3 GB parts):
|
||||
- Archive files/directories to a multi-part split Zip archive (e.g. 3 GB parts):
|
||||
|
||||
`zip {{[-r|--recurse-paths]}} {{[-s|--split-size]}} {{3g}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
|
||||
|
||||
|
||||
16
tldr/llm
16
tldr/llm
@@ -16,22 +16,22 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`llm "{{Ten fun names for a pet pelican}}"`
|
||||
|
||||
- Run a [s]ystem prompt against a file:
|
||||
- Run a system prompt against a file:
|
||||
|
||||
`cat {{path/to/file.py}} | llm --system "{{Explain this code}}"`
|
||||
`cat {{path/to/file.py}} | llm {{[-s|--system]}} "{{Explain this code}}"`
|
||||
|
||||
- Install packages from PyPI into the same environment as LLM:
|
||||
|
||||
`llm install {{package1 package2 ...}}`
|
||||
|
||||
- Download and run a prompt against a [m]odel:
|
||||
- Download and run a prompt against a model:
|
||||
|
||||
`llm --model {{orca-mini-3b-gguf2-q4_0}} "{{What is the capital of France?}}"`
|
||||
`llm {{[-m|--model]}} {{orca-mini-3b-gguf2-q4_0}} "{{What is the capital of France?}}"`
|
||||
|
||||
- Create a [s]ystem prompt and [s]ave it with a template name:
|
||||
- Create a system prompt and save it with a template name:
|
||||
|
||||
`llm --system '{{You are a sentient cheesecake}}' --save {{sentient_cheesecake}}`
|
||||
`llm {{[-s|--system]}} '{{You are a sentient cheesecake}}' --save {{sentient_cheesecake}}`
|
||||
|
||||
- Have an interactive chat with a specific [m]odel using a specific [t]emplate:
|
||||
- Have an interactive chat with a specific model using a specific template:
|
||||
|
||||
`llm chat --model {{chatgpt}} --template {{sentient_cheesecake}}`
|
||||
`llm chat {{[-m|--model]}} {{chatgpt}} {{[-t|--template]}} {{sentient_cheesecake}}`
|
||||
|
||||
10
tldr/look
10
tldr/look
@@ -14,14 +14,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`look {{prefix}} {{path/to/file}}`
|
||||
|
||||
- Case-insensitively ([f]) search only on alphanumeric characters ([d]):
|
||||
- Case-insensitively search only on alphanumeric characters:
|
||||
|
||||
`look -f -d {{prefix}} {{path/to/file}}`
|
||||
`look {{[-f|--ignore-case]}} {{[-d|--alphanum]}} {{prefix}} {{path/to/file}}`
|
||||
|
||||
- Specify a string [t]ermination character (space by default):
|
||||
- Specify a string termination character (space by default):
|
||||
|
||||
`look -t {{,}}`
|
||||
`look {{[-t|--terminate]}} {{,}}`
|
||||
|
||||
- Search in `/usr/share/dict/words` (`-d` and `-f` are assumed):
|
||||
- Search in `/usr/share/dict/words` (`--alphanum` and `--ignore-case` are assumed):
|
||||
|
||||
`look {{prefix}}`
|
||||
|
||||
@@ -16,13 +16,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`lstopo --no-factorize`
|
||||
|
||||
- Show the summarized system topology with only [p]hysical indices (i.e. as seen by the OS):
|
||||
- Show the summarized system topology with only physical indices (i.e. as seen by the OS):
|
||||
|
||||
`lstopo --physical`
|
||||
`lstopo {{[-p|--physical]}}`
|
||||
|
||||
- Write the full system topology to a file in the specified format:
|
||||
|
||||
`lstopo --no-factorize --output-format {{console|ascii|tex|fig|svg|pdf|ps|png|xml}} {{path/to/file}}`
|
||||
`lstopo --no-factorize {{[--of|--output-format]}} {{console|ascii|tex|fig|svg|pdf|ps|png|xml}} {{path/to/file}}`
|
||||
|
||||
- Output in monochrome or greyscale:
|
||||
|
||||
|
||||
37
tldr/npm-config
Normal file
37
tldr/npm-config
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm-config
|
||||
|
||||
> Manage the `npm` configuration settings.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-config>.
|
||||
|
||||
- Show all configuration settings:
|
||||
|
||||
`npm config list`
|
||||
|
||||
- List all configuration settings as `JSON`:
|
||||
|
||||
`npm config list --json`
|
||||
|
||||
- Get the value of a specific configuration key:
|
||||
|
||||
`npm config get {{key}}`
|
||||
|
||||
- Set a configuration key to a specific value:
|
||||
|
||||
`npm config set {{key}}={{value}}`
|
||||
|
||||
- Delete a configuration key:
|
||||
|
||||
`npm config delete {{key}}`
|
||||
|
||||
- Edit the global npm configuration file in the default editor:
|
||||
|
||||
`npm config edit`
|
||||
|
||||
- Attempt to repair invalid configuration items:
|
||||
|
||||
`npm config fix`
|
||||
33
tldr/osx/herd
Normal file
33
tldr/osx/herd
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, osx]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# herd
|
||||
|
||||
> An official Laravel PHP development environment for macOS.
|
||||
> More information: <https://herd.laravel.com>.
|
||||
|
||||
- Start the Herd services:
|
||||
|
||||
`herd start`
|
||||
|
||||
- Stop the Herd services:
|
||||
|
||||
`herd stop`
|
||||
|
||||
- Restart the Herd services:
|
||||
|
||||
`herd restart`
|
||||
|
||||
- Link the current working directory to Herd:
|
||||
|
||||
`herd link`
|
||||
|
||||
- Open the site for the current directory in the browser:
|
||||
|
||||
`herd open`
|
||||
|
||||
- List all available commands:
|
||||
|
||||
`herd list`
|
||||
2
tldr/rg
2
tldr/rg
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rg
|
||||
|
||||
> Ripgrep is a recursive line-oriented search tool.
|
||||
> Ripgrep, a recursive line-oriented search tool.
|
||||
> Aims to be a faster alternative to `grep`.
|
||||
> More information: <https://github.com/BurntSushi/ripgrep>.
|
||||
|
||||
|
||||
14
tldr/shred
14
tldr/shred
@@ -14,20 +14,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Overwrite a file and show progress on the screen:
|
||||
|
||||
`shred --verbose {{path/to/file}}`
|
||||
`shred {{[-v|--verbose]}} {{path/to/file}}`
|
||||
|
||||
- Overwrite a file, leaving [z]eros instead of random data:
|
||||
- Overwrite a file, leaving zeros instead of random data:
|
||||
|
||||
`shred --zero {{path/to/file}}`
|
||||
`shred {{[-z|--zero]}} {{path/to/file}}`
|
||||
|
||||
- Overwrite a file a specific [n]umber of times:
|
||||
- Overwrite a file a specific number of times:
|
||||
|
||||
`shred --iterations {{25}} {{path/to/file}}`
|
||||
`shred {{[-n|--iterations]}} {{25}} {{path/to/file}}`
|
||||
|
||||
- Overwrite a file and remove it:
|
||||
|
||||
`shred --remove {{path/to/file}}`
|
||||
|
||||
- Overwrite a file 100 times, add a final overwrite with [z]eros, remove the file after overwriting it and show [v]erbose progress on the screen:
|
||||
- Overwrite a file 100 times, add a final overwrite with zeros, remove the file after overwriting it and show verbose progress on the screen:
|
||||
|
||||
`shred -vzun 100 {{path/to/file}}`
|
||||
`shred {{[-vzun|--verbose --zero -u --iterations]}} 100 {{path/to/file}}`
|
||||
|
||||
26
tldr/vagrant-halt
Normal file
26
tldr/vagrant-halt
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant halt
|
||||
|
||||
> Shuts down the running machine Vagrant is managing.
|
||||
> See also: `vagrant`, `vagrant box`, `vagrant plugin`, `vagrant validate`.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/halt>.
|
||||
|
||||
- Halt the currently running Vagrant machine gracefully:
|
||||
|
||||
`vagrant halt`
|
||||
|
||||
- Halt a specific machine by its ID or name gracefully:
|
||||
|
||||
`vagrant halt {{id_or_name}}`
|
||||
|
||||
- Forcefully halt the current running machine(s) (This can affect multiple running machines if they are part of the same Vagrant environment):
|
||||
|
||||
`vagrant halt {{[-f|--force]}}`
|
||||
|
||||
- Forcefully halt a specific machine by its ID or name:
|
||||
|
||||
`vagrant halt {{[-f|--force]}} {{id_or_name}}`
|
||||
Reference in New Issue
Block a user