Update cheatsheets

This commit is contained in:
ivuorinen
2026-03-08 00:28:01 +00:00
parent 37dc335613
commit 2867c6af80
5 changed files with 77 additions and 12 deletions

View File

@@ -9,18 +9,14 @@ source: https://github.com/tldr-pages/tldr.git
> See also: `dmesg`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/journalctl.html>.
- Show all messages with priority level 3 (errors) from this boot:
`journalctl {{[-b|--boot]}} {{[-p|--priority]}} 3`
- Delete journal logs which are older than 2 days:
`journalctl --vacuum-time 2d`
- Show only the last `n` lines and follow new messages (like `tail -f` for traditional syslog):
- Show the latest `n` lines and follow new messages (like `tail --follow` for traditional syslog):
`journalctl {{[-n|--lines]}} {{n}} {{[-f|--follow]}}`
- Show all messages with priority level 3 (errors) from the boot before last shutdown:
`journalctl {{[-b|--boot]}} -1 {{[-p|--priority]}} 3`
- Show all messages by a specific unit:
`journalctl {{[-u|--unit]}} {{unit}}`
@@ -31,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
- Filter messages within a time range (either timestamp or placeholders like "yesterday"):
`journalctl {{[-S|--since]}} {{now|today|yesterday|tomorrow}} {{[-U|--until]}} "{{YYYY-MM-DD HH:MM:SS}}"`
`journalctl {{[-S|--since]}} {{now|today|yesterday|tomorrow|...}} {{[-U|--until]}} "{{YYYY-MM-DD HH:MM:SS}}"`
- Show all messages by a specific process:
@@ -40,3 +36,7 @@ source: https://github.com/tldr-pages/tldr.git
- Show all messages by a specific executable:
`journalctl {{path/to/executable}}`
- Delete journal logs which are older than 2 days:
`journalctl --vacuum-time 2d`