diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index b2951ed1b1..59736143bc 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -2567,7 +2567,12 @@ static int run(int argc, char *argv[]) { break; } - if (arg_until_set && !arg_reverse && arg_lines < 0) { + if (arg_until_set && !arg_reverse && (arg_lines < 0 || arg_since_set)) { + /* If --lines= is set, we usually rely on the n_shown to tell us + * when to stop. However, if --since= is set too, we may end up + * having less than --lines= to output. In this case let's also + * check if the entry is in range. */ + usec_t usec; r = sd_journal_get_realtime_usec(j, &usec);