Report the disk space used by stored journal files without deleting anything.
Which command is appropriate?
journalctl --disk-usage reports the total size of active and archived journal files without changing them.
Detailed explanation
journalctl --disk-usageCorrect. It displays current journal disk usage.
Correct. It displays current journal disk usage.
journalctl --vacuum-sizeIncorrect. --vacuum-size requires a size and deletes old archives.
Incorrect. --vacuum-size requires a size and deletes old archives.
journalctl --rotateIncorrect. --rotate archives the active journal.
Incorrect. --rotate archives the active journal.
du --journalIncorrect. du has no standard --journal option.
Incorrect. du has no standard --journal option.
Try it yourself
An example you can run in a temporary verification environment.
journalctl --help | grep -E -- '--disk-usage'Expected result
disk usage表示のhelp行Key points
- Read-only
- Includes active and archived data
- Check before vacuuming
Notes
- Environment: systemd journalctl help / journal削除なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.