summaryrefslogtreecommitdiffstats
path: root/man/journalctl.xml
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-02-18 14:49:21 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-02-18 23:06:49 +0100
commitdb4691961ca52759fe6645d0fddb659ee4299ac2 (patch)
treeec0627f3f7825a05acd1199deef37f4f9b362c35 /man/journalctl.xml
parentloop-util: fix error condition and return value (diff)
downloadsystemd-db4691961ca52759fe6645d0fddb659ee4299ac2.tar.xz
systemd-db4691961ca52759fe6645d0fddb659ee4299ac2.zip
journalctl: fix output when --lines is used with --grep
Previously, we skip the entries before arg_lines unconditionally, which doesn't behave correctly when used with --grep. After this commit, when a pattern is specified, we don't skip the entries early, but rely on the count of the lines shown to tell us when to stop. To achieve that we would have to search backwards instead. Fixes #25147
Diffstat (limited to 'man/journalctl.xml')
-rw-r--r--man/journalctl.xml8
1 files changed, 6 insertions, 2 deletions
diff --git a/man/journalctl.xml b/man/journalctl.xml
index 109797776e..ae86c50d62 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -363,7 +363,9 @@
<para>If the pattern is all lowercase, matching is case insensitive. Otherwise, matching is case
sensitive. This can be overridden with the <option>--case-sensitive</option> option, see
- below.</para></listitem>
+ below.</para>
+
+ <para>When used with <option>--lines=</option>, <option>--reverse</option> is implied.</para></listitem>
</varlistentry>
<varlistentry>
@@ -540,7 +542,9 @@
<listitem><para>Show the most recent journal events and limit the number of events shown. If
<option>--follow</option> is used, this option is implied. The argument is a positive integer or
<literal>all</literal> to disable line limiting. The default value is 10 if no argument is
- given.</para></listitem>
+ given.</para>
+
+ <para>When used with <option>--grep=</option>, <option>--reverse</option> is implied.</para></listitem>
</varlistentry>
<varlistentry>