Show macOS errors from the last hour
Build a paste-ready command, then review its compatibility and effects before running it.
log show --last 1h --style compact --predicate 'messageType == error' | tail -30read-onlyno known side effects Compatibility
macOSVerified for macOS using zsh, bash syntax.
Operational knowledgereview due 2027-01-20
Requirementsloglog must be installed and available on PATH.
Version supportlog Current supported releasesVerified for macos using zsh, bash syntax; consult compatibility notes for platform-specific differences.
Expected signals2026-07-24 12:01:42.312 E Finder[842:1a2b] [com.apple.Finder] Failed to read directory metadataRepresentative successful output; values vary with the selected target and system state.
Known errorslog: command not foundlog is missing or is not available on PATH.
Verifylog show --last 1h --style compact --predicate 'messageType == error' | tail -30The 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
01logCommandRuns the log stage of this one-liner.
02showArgumentPasses show to log.
03--lastOptionConfigures log with the --last option.
041hArgumentPasses 1h to log.
05--styleOptionConfigures log with the --style option.
06compactArgumentPasses compact to log.
07--predicateOptionConfigures log with the --predicate option.
08'messageType == error'ArgumentPasses 'messageType == error' to log.
09|PipelinePasses the output on the left to the command on the right.
10tailCommandRuns the tail stage of this one-liner.
11-30OptionConfigures tail with the -30 option.
Example input
log show --last 1h --style compact --predicate 'messageType == error' | tail -30
Example output
2026-07-24 12:01:42.312 E Finder[842:1a2b] [com.apple.Finder] Failed to read directory metadata
Illustrative output — exact values vary by system and data.
Official sources