Read one service log for the last hour with precise timestamps
Build a paste-ready command, then review its compatibility and effects before running it.
journalctl -u <service> --since '1 hour ago' -o short-iso-precise --no-pagerComplete required fields to copy the generated command.
read-onlyno known side effects Compatibility
LinuxVerified for Linux using bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsjournalctljournalctl must be installed and available on PATH.
Version supportjournalctl Current supported releasesVerified for linux using bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signals2026-07-23T09:18:41.281442+0200 web-01 nginx[991]: 203.0.113.8 - GET /health 200 3msRepresentative successful output; values vary with the selected target and system state.
Known errorsjournalctl: command not foundjournalctl is missing or is not available on PATH.
Verifyjournalctl -u {{service}} --since '1 hour ago' -o short-iso-precise --no-pagerThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01journalctlCommandRuns the journalctl stage of this one-liner.
02-uOptionRestricts journal records to the named systemd unit.
03<service>ParameterA value supplied in the Fill parameters section.
04--sinceOptionLimits results to entries after the supplied time.
05'1 hour ago'ArgumentPasses '1 hour ago' to journalctl.
06-oOptionSelects an output file or output format for this command.
07short-iso-preciseArgumentPasses short-iso-precise to journalctl.
08--no-pagerOptionPrints directly instead of opening an interactive pager.
This advanced community-curated one-liner combines several stages. Review every option and placeholder before running it.
Example input
journalctl -u nginx --since '1 hour ago' -o short-iso-precise --no-pager
Example output
2026-07-23T09:18:41.281442+0200 web-01 nginx[991]: 203.0.113.8 - GET /health 200 3ms
2026-07-23T09:41:17.002110+0200 web-01 nginx[991]: upstream timed out while reading response header
Illustrative output — exact values vary by system and data.
Official sources