Linux Survival Basics
Read-only, can be slowRead Recent Logrotate Journal
You need recent logrotate service output.
Command
journalctl -u logrotate --since '7 days ago' --no-pager
Before you run this
System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.
When not to use it: Do not paste full logs publicly without redacting paths.
Expected output
Recent logrotate unit logs, errors, and skipped-file messages.
System impact
Read-only, can be slow. Nothing changes. The command reads current state and prints diagnostic evidence.
Scope this to the smallest useful path or service on busy systems.
Recovery / rollback: no state is changed.
When to use it
Use after debug output or timer status.
When not to use it
Do not paste full logs publicly without redacting paths.
Example run
Commands shown
These are the commands shown for inspection. Treat them as an example, not proof that your system will behave identically.
journalctl -u logrotate --since '7 days ago' --no-pagerjournalctl -u logrotate --since '7 days ago' --no-pager
next steps
Related commands
Read Recent systemd Timer Logs
Timer logs show whether systemd attempted to trigger the task.
journalctl -u backup.timer --since "24 hours ago" --no-pager
Find OOM Killer Lines in the Kernel Journal
Before restarting a service, prove whether the kernel killed it.
journalctl -k --since '24 hours ago' --no-pager | grep -iE 'out of memory|oom-killer|killed process'
Spot OOM Kills in the Kernel Journal
Exit code 137 often means the kernel has something to say.
journalctl -k --since "2 hours ago" --no-pager -o short-iso | grep -Ei 'out of memory|oom|killed process'
Read Current-Boot Logs for One Service
Ignore stale logs and inspect only what happened since this boot.
journalctl -u nginx -b --no-pager -n 80
Read Mount and fstab Warnings
The boot journal often names the mount or dependency that failed.
journalctl -b -p warning --no-pager | grep -iE 'mount|fstab|dependency'
next diagnostic step
Where to go from this command
- Logrotate not running hub Use to read rotation failures.
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.