1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-04 21:47:31 +03:00
Jörg Sommer d9e15cbd18 journalctl: New option --cursor-file
The option cursor-file takes a filename as argument. If the file exists and
contains a valid cursor, this is used to start the output after this position.
At the end, the last cursor gets written to the file.

This allows for an easy implementation of a timer that regularly looks in the
journal for some messages.

    journalctl --cursor-file err-cursor -b -p err
    journalctl --cursor-file audit-cursor -t audit --grep DENIED

Or you might want to walk the journal in steps of 10 messages:

    journalctl --cursor-file ./curs -n10 --since=today -t systemd
2019-02-27 18:43:31 +01:00
..
2018-06-14 13:03:20 +02:00
2018-07-03 01:32:25 +02:00
2018-10-11 10:55:41 +02:00
2018-10-13 12:59:29 +02:00
2019-01-13 11:12:20 +01:00
2019-01-15 21:45:06 +01:00
2018-11-09 21:40:21 +01:00
2019-02-22 17:44:21 +01:00
2018-07-21 10:17:58 +09:00