mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 01:47:36 +00:00
Update cheatsheets
This commit is contained in:
@@ -9,22 +9,26 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> This generates files named "xx00", "xx01", and so on.
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/csplit-invocation.html>.
|
||||
|
||||
- Split a file at lines 5 and 23:
|
||||
- Split a file in two parts, starting the second one at line 10:
|
||||
|
||||
`csplit {{path/to/file}} 5 23`
|
||||
`csplit {{path/to/file}} 10`
|
||||
|
||||
- Split a file every 5 lines (this will fail if the total number of lines is not divisible by 5):
|
||||
- Split a file in three parts, starting the latter parts in lines 7 and 23:
|
||||
|
||||
`csplit {{path/to/file}} 7 23`
|
||||
|
||||
- Start a new part at every 5th line (will fail if number of lines is not divisible by 5):
|
||||
|
||||
`csplit {{path/to/file}} 5 {*}`
|
||||
|
||||
- Split a file every 5 lines, ignoring exact-division error:
|
||||
- Start a new part at every 5th line, ignoring exact-division error:
|
||||
|
||||
`csplit {{[-k|--keep-files]}} {{path/to/file}} 5 {*}`
|
||||
|
||||
- Split a file at line 5 and use a custom prefix for the output files:
|
||||
- Split a file above line 5 and use a custom prefix for the output files (default is `xx`):
|
||||
|
||||
`csplit {{path/to/file}} 5 {{[-f|--prefix]}} {{prefix}}`
|
||||
|
||||
- Split a file at a line matching a `regex`:
|
||||
- Split a file above the first line matching a `regex` pattern:
|
||||
|
||||
`csplit {{path/to/file}} /{{regex}}/`
|
||||
|
||||
21
tldr/linux/koji-help
Normal file
21
tldr/linux/koji-help
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# koji help
|
||||
|
||||
> Display help information for Koji commands.
|
||||
> More information: <https://docs.pagure.org/koji/HOWTO/#exploring-koji>.
|
||||
|
||||
- Display all available commands:
|
||||
|
||||
`koji help`
|
||||
|
||||
- Display help for specific subcommand (such as `build`, `call`, `cancel`, `tag-build`, etc.):
|
||||
|
||||
`koji help {{subcommand}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`koji {{[-h|--help]}}`
|
||||
22
tldr/linux/systemctl-reenable
Normal file
22
tldr/linux/systemctl-reenable
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl reenable
|
||||
|
||||
> Re-enable one or more units.
|
||||
> Used when targets of a service change.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#reenable%20UNIT%E2%80%A6>.
|
||||
|
||||
- Re-enable a unit, restoring its default symlinks:
|
||||
|
||||
`systemctl reenable {{unit}}`
|
||||
|
||||
- Re-enable multiple units at once:
|
||||
|
||||
`systemctl reenable {{unit1 unit2 ...}}`
|
||||
|
||||
- Re-enable a unit and start it immediately:
|
||||
|
||||
`systemctl reenable {{unit}} --now`
|
||||
34
tldr/linux/systemctl-service-log-target
Normal file
34
tldr/linux/systemctl-service-log-target
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl service-log-target
|
||||
|
||||
> Get or set the log target for a service.
|
||||
> Only works for D-Bus integrated services.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#service-log-target%20SERVICE%20[TARGET]>.
|
||||
|
||||
- Show the current log target for a service:
|
||||
|
||||
`systemctl service-log-target {{service_name}}`
|
||||
|
||||
- Set the log target to `console` (send logs to `stderr`):
|
||||
|
||||
`systemctl service-log-target {{service_name}} console`
|
||||
|
||||
- Set the log target to `journal` (send logs to `systemd-journald`):
|
||||
|
||||
`systemctl service-log-target {{service_name}} journal`
|
||||
|
||||
- Set the log target to `syslog` (send logs to `/dev/log`):
|
||||
|
||||
`systemctl service-log-target {{service_name}} syslog`
|
||||
|
||||
- Allow systemd to choose an appropriate log target:
|
||||
|
||||
`systemctl service-log-target {{service_name}} auto`
|
||||
|
||||
- Disable all log output:
|
||||
|
||||
`systemctl service-log-target {{service_name}} null`
|
||||
@@ -7,11 +7,19 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Manage containerized command-line environments on Linux.
|
||||
> Some subcommands such as `create` have their own usage documentation.
|
||||
> More information: <https://manned.org/toolbox.1>.
|
||||
> More information: <https://manned.org/toolbox>.
|
||||
|
||||
- Run a `toolbox` subcommand:
|
||||
- Enter a container to use it interactively:
|
||||
|
||||
`toolbox {{subcommand}}`
|
||||
`toolbox enter {{container}}`
|
||||
|
||||
- Remove one or more containers:
|
||||
|
||||
`toolbox rm {{container1 container2 ...}}`
|
||||
|
||||
- Remove one or more images:
|
||||
|
||||
`toolbox rmi {{image1 image2 ...}}`
|
||||
|
||||
- Display help for a specific subcommand (such as `create`, `enter`, `rm`, `rmi`, etc.):
|
||||
|
||||
|
||||
34
tldr/linux/toybox
Normal file
34
tldr/linux/toybox
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# toybox
|
||||
|
||||
> Multipurpose tool that provides many standard Unix utilities.
|
||||
> Commonly used in Android and embedded Linux systems.
|
||||
> More information: <https://landley.net/toybox/>.
|
||||
|
||||
- List all available Toybox commands:
|
||||
|
||||
`toybox`
|
||||
|
||||
- Run a Toybox command explicitly (useful if another command with the same name exists in `$PATH`):
|
||||
|
||||
`toybox {{command}} {{arguments}}`
|
||||
|
||||
- List files in the current directory:
|
||||
|
||||
`toybox ls`
|
||||
|
||||
- Remove a file:
|
||||
|
||||
`toybox rm {{path/to/file}}`
|
||||
|
||||
- Display help information for a specific command:
|
||||
|
||||
`toybox {{command}} --help`
|
||||
|
||||
- Display version:
|
||||
|
||||
`toybox --version`
|
||||
Reference in New Issue
Block a user