Query journald for a time range
Show nginx logs between two points in time.
journalctl --since '2024-01-15 10:00' --until '2024-01-15 10:30' -u nginx
- tool
- linux133 commands
More linux commands
-
journalctl -u <service> -o json | jq '{ts: .REALTIME_TIMESTAMP, msg: .MESSAGE}'Export logs as structured JSON (time and message), for example to send them to a log aggregator.
-
timedatectl status && chronyc trackingShow clock sync state, time offset and NTP source details.
-
systemctl list-timers --all --no-pagerList all timers with their last and next run times.
-
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@hostAdd your public key to authorized_keys on a remote host.
-
rsync -avz --progress --delete src/ user@host:/dest/Mirror a directory to a remote host and delete files that are not in the source.