mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-18 22:50:07 +00:00
Update cheatsheets
This commit is contained in:
@@ -8,21 +8,21 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Query the systemd journal.
|
||||
> More information: <https://manned.org/journalctl>.
|
||||
|
||||
- Show all messages with priority level 3 (errors) from this [b]oot:
|
||||
- Show all messages with priority level 3 (errors) from this boot:
|
||||
|
||||
`journalctl -b --priority=3`
|
||||
`journalctl {{[-b|--boot]}} {{[-p|--priority]}} 3`
|
||||
|
||||
- Delete journal logs which are older than 2 days:
|
||||
|
||||
`journalctl --vacuum-time=2d`
|
||||
`journalctl --vacuum-time 2d`
|
||||
|
||||
- Show only the last N li[n]es and [f]ollow new messages (like `tail -f` for traditional syslog):
|
||||
- Show only the last N lines and follow new messages (like `tail -f` for traditional syslog):
|
||||
|
||||
`journalctl --lines {{N}} --follow`
|
||||
`journalctl {{[-n|--lines]}} {{N}} {{[-f|--follow]}}`
|
||||
|
||||
- Show all messages by a specific [u]nit:
|
||||
- Show all messages by a specific unit:
|
||||
|
||||
`journalctl --unit {{unit}}`
|
||||
`journalctl {{[-u|--unit]}} {{unit}}`
|
||||
|
||||
- Show logs for a given unit since the last time it started:
|
||||
|
||||
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Filter messages within a time range (either timestamp or placeholders like "yesterday"):
|
||||
|
||||
`journalctl --since {{now|today|yesterday|tomorrow}} --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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user