Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-14 00:20:26 +00:00
parent 39d8cd0675
commit 09d5fa917f
6 changed files with 40 additions and 14 deletions

View File

@@ -8,11 +8,11 @@ source: https://github.com/tldr-pages/tldr.git
> A GUI SQL client supporting many databases.
> More information: <https://dbeaver.com/docs/dbeaver/Command-Line/>.
- Open `DBeaver`:
- Open DBeaver:
`dbeaver`
- Open `DBeaver` connecting to a specific database:
- Open DBeaver connecting to a specific database:
`dbeaver {{[-con|--connect]}} {{database}}`
@@ -24,11 +24,11 @@ source: https://github.com/tldr-pages/tldr.git
`dbeaver --quit`
- Close all tabs within dbeaver:
- Close all tabs within DBeaver:
`dbeaver --closeTabs`
- Bring `DBeaver` to the top of applications:
- Bring DBeaver to the top of applications:
`dbeaver --bringToFront`

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Activate output of all errors and warnings:
`g++ {{path/to/source.cpp}} -Wall {{[-o|--output]}} {{output_executable}}`
`g++ {{path/to/source.cpp}} -Wall {{[-o|--output]}} {{path/to/output_executable}}`
- Show common warnings, debug symbols in output, and optimize without affecting debugging:

View File

@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- Debug an executable:
`gdb {{executable}}`
`gdb {{path/to/executable}}`
- Attach a process to gdb:
- Attach a process to `gdb`:
`gdb {{[-p|--pid]}} {{procID}}`
- Debug with a core file:
`gdb {{[-c|--core]}} {{core}} {{executable}}`
`gdb {{[-c|--core]}} {{path/to/core}} {{path/to/executable}}`
- Execute given GDB commands upon start:
`gdb {{[-ex|--eval-command]}} "{{commands}}" {{executable}}`
`gdb {{[-ex|--eval-command]}} "{{commands}}" {{path/to/executable}}`
- Start `gdb` and pass arguments to the executable:
`gdb --args {{executable}} {{argument1}} {{argument2}}`
`gdb --args {{path/to/executable}} {{argument1 argument2 ...}}`
- Skip debuginfod and pagination prompts and then print the backtrace:
- Skip `debuginfod` and pagination prompts and then print the backtrace:
`gdb {{[-c|--core]}} {{core}} {{executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt`
`gdb {{[-c|--core]}} {{path/to/core}} {{path/to/executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt`

View File

@@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git
`git bisect {{good|bad}}`
- After `git bisect` pinpoints the faulty commit, end the bisect session and return to the previous branch:
- End the bisect session and return to the previous branch:
`git bisect reset`

View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl whoami
> Show units that processes belong to.
> If no PID is specified, shows the unit the `systemctl` command itself is invoked in.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#whoami%20%5BPID%E2%80%A6%5D>.
- Show the unit of the current shell (where `systemctl` is running):
`systemctl whoami`
- Show the unit of the current shell in user service manager (services managed for your login session):
`systemctl --user whoami`
- Show the unit a specific process belongs to:
`systemctl whoami {{pid}}`
- Show the units for multiple processes:
`systemctl whoami {{pid1 pid2 ...}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Execute a specific method passing arguments and display the returned value:
`qdbus {{service_name}} /{{path/to/object}} {{method_name}} {{argument1}} {{argument2}}`
`qdbus {{service_name}} /{{path/to/object}} {{method_name}} {{argument1 argument2 ...}}`
- Display the current brightness value in a KDE Plasma session: