summaryrefslogtreecommitdiffstats
path: root/man/journalctl.xml
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-08-10 19:41:03 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-08-16 14:05:19 +0200
commit8d6791d2aa98c989101f572278e9b0a63edfec42 (patch)
treee7ffdd30193296711f203a0f127886b1d96dd951 /man/journalctl.xml
parentMerge pull request #28854 from keszybz/mailmap-and-license-info (diff)
downloadsystemd-8d6791d2aa98c989101f572278e9b0a63edfec42.tar.xz
systemd-8d6791d2aa98c989101f572278e9b0a63edfec42.zip
journalctl: support --lines=+N for showing the oldest N entries
After f58269510727964cb5c10e7d2f9849c442ea1f80, the wrong behavior occurred when --since= and --lines= are both specified is fixed. However, it seems that the old behavior is already being somewhat widely used, and the function itself makes sense, i.e. to allow --lines= to output the first N journal entries. Therefore, let's support prefixing the number for --lines= with '+', and provide such functionality. Related: #28746
Diffstat (limited to 'man/journalctl.xml')
-rw-r--r--man/journalctl.xml14
1 files changed, 8 insertions, 6 deletions
diff --git a/man/journalctl.xml b/man/journalctl.xml
index 70d8508cf0..d6f2278983 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -371,7 +371,8 @@
sensitive. This can be overridden with the <option>--case-sensitive</option> option, see
below.</para>
- <para>When used with <option>--lines=</option>, <option>--reverse</option> is implied.</para></listitem>
+ <para>When used with <option>--lines=</option> (not prefixed with <literal>+</literal>),
+ <option>--reverse</option> is implied.</para></listitem>
</varlistentry>
<varlistentry>
@@ -552,12 +553,13 @@
<term><option>-n</option></term>
<term><option>--lines=</option></term>
- <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><para>Show the most recent journal events and limit the number of events shown. The argument
+ is a positive integer or <literal>all</literal> to disable the limit. Additionally, if the number is
+ prefixed with <literal>+</literal>, the oldest journal events are used instead. The default value is
+ 10 if no argument is given.</para>
- <para>When used with <option>--grep=</option>, <option>--reverse</option> is implied.</para></listitem>
+ <para>If <option>--follow</option> is used, this option is implied. When not prefixed with <literal>+</literal>
+ and used with <option>--grep=</option>, <option>--reverse</option> is implied.</para></listitem>
</varlistentry>
<varlistentry>