* [PATCH 2/8] docs: improve and harmonize the description of -H / --list-columns
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-14 9:45 ` [PATCH 3/8] docs: fix a few indentation issues Benno Schulenberg
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
lsfd-cmd/lsfd.1.adoc | 3 ++-
misc-utils/findmnt.8.adoc | 3 ++-
misc-utils/lsblk.8.adoc | 3 ++-
misc-utils/lslocks.8.adoc | 3 ++-
sys-utils/lsns.8.adoc | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc
index d1a78f105..b0ba2ba53 100644
--- a/lsfd-cmd/lsfd.1.adoc
+++ b/lsfd-cmd/lsfd.1.adoc
@@ -114,7 +114,8 @@ Dump the definition of counters used in *--summary* output.
Print paths as terminal hyperlinks. The _mode_ can be set to "always", "never", or "auto". The optional argument _when_ can be set to "auto", "never", or "always". If the _when_ argument is omitted, it will default to "auto". The "auto" setting means that hyperlinks will only be used if the output is on a terminal.
*-H*, *--list-columns*::
-List available columns that you can specify at *--output* option.
+List the columns that can be specified with the *--output* option.
+Can be used with *--json* or *--raw* to get the list in a machine-readable format.
include::man-common/help-version.adoc[]
diff --git a/misc-utils/findmnt.8.adoc b/misc-utils/findmnt.8.adoc
index 9ac9316e3..a26fb8ca2 100644
--- a/misc-utils/findmnt.8.adoc
+++ b/misc-utils/findmnt.8.adoc
@@ -64,7 +64,8 @@ Search in an alternative file. If used with *--fstab*, *--mtab* or *--kernel*, t
Print the first matching filesystem only.
*-H*, *--list-columns*::
-List the available columns, use with *--json* or *--raw* to get output in machine-readable format.
+List the columns that can be specified with the *--output* option.
+Can be used with *--json* or *--raw* to get the list in a machine-readable format.
*--hyperlink*[**=**_mode_]::
Print mountpoint paths as terminal hyperlinks. The optional _mode_ argument
diff --git a/misc-utils/lsblk.8.adoc b/misc-utils/lsblk.8.adoc
index 742fe5f68..8151525af 100644
--- a/misc-utils/lsblk.8.adoc
+++ b/misc-utils/lsblk.8.adoc
@@ -42,7 +42,8 @@ Disable all built-in filters and list all empty devices and RAM disk devices too
include::man-common/in-bytes.adoc[]
*-H*, *--list-columns*::
-List the available columns, use with *--json* or *--raw* to get output in machine-readable format.
+List the columns that can be specified with the *--output* option.
+Can be used with *--json* or *--raw* to get the list in a machine-readable format.
*-D*, *--discard*::
Print information about the discarding capabilities (TRIM, UNMAP) for each device.
diff --git a/misc-utils/lslocks.8.adoc b/misc-utils/lslocks.8.adoc
index 2084d96c0..2395d86fb 100644
--- a/misc-utils/lslocks.8.adoc
+++ b/misc-utils/lslocks.8.adoc
@@ -35,7 +35,8 @@ lslocks - list local system locks
include::man-common/in-bytes.adoc[]
*-H*, *--list-columns*::
-List the available columns, use with *--json* or *--raw* to get output in machine-readable format.
+List the columns that can be specified with the *--output* option.
+Can be used with *--json* or *--raw* to get the list in a machine-readable format.
*-i*, *--noinaccessible*::
Ignore lock files which are inaccessible for the current user.
diff --git a/sys-utils/lsns.8.adoc b/sys-utils/lsns.8.adoc
index 88c2b848f..3cbe3504e 100644
--- a/sys-utils/lsns.8.adoc
+++ b/sys-utils/lsns.8.adoc
@@ -32,7 +32,8 @@ Note that *lsns* reads information directly from the _/proc_ filesystem and for
== OPTIONS
*-H*, *--list-columns*::
-List the available columns, use with *--json* or *--raw* to get output in machine-readable format.
+List the columns that can be specified with the *--output* option.
+Can be used with *--json* or *--raw* to get the list in a machine-readable format.
*-J*, *--json*::
Use JSON output format.
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/8] docs: fix a few indentation issues
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
2025-04-14 9:45 ` [PATCH 2/8] docs: improve and harmonize the description of -H / --list-columns Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-14 9:45 ` [PATCH 4/8] agetty,setterm: (man) remove the mistakenly added -h and -V short options Benno Schulenberg
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux
That is: add "+" or " +" to keep paragraphs together.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/cal.1.adoc | 1 +
sys-utils/flock.1.adoc | 2 +-
sys-utils/hwclock.8.adoc | 6 ++++--
sys-utils/setpriv.1.adoc | 1 +
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/misc-utils/cal.1.adoc b/misc-utils/cal.1.adoc
index 06b4238df..9f1740620 100644
--- a/misc-utils/cal.1.adoc
+++ b/misc-utils/cal.1.adoc
@@ -102,6 +102,7 @@ This option sets the adoption date of the Gregorian calendar reform. Calendar da
* _gregorian_ - display Gregorian calendars exclusively. This special placeholder sets the reform date below the smallest year that *cal* can use; meaning all calendar output uses the Gregorian calendar system. This is called the proleptic Gregorian calendar, because dates prior to the calendar system's creation use extrapolated values.
* _iso_ - alias of _gregorian_. The ISO 8601 standard for the representation of dates and times in information interchange requires using the proleptic Gregorian calendar.
* _julian_ - display Julian calendars exclusively. This special placeholder sets the reform date above the largest year that *cal* can use; meaning all calendar output uses the Julian calendar system.
+
+
See *DESCRIPTION* above.
diff --git a/sys-utils/flock.1.adoc b/sys-utils/flock.1.adoc
index 08843942f..247ab385f 100644
--- a/sys-utils/flock.1.adoc
+++ b/sys-utils/flock.1.adoc
@@ -82,7 +82,7 @@ Fail if the lock cannot be acquired within _seconds_. Decimal fractional values
*--fcntl*::
Instead of flock(2), apply an fcntl(2) open file description lock (that is, using the F_OFD_SETLK (non-blocking) or F_OFD_SETLKW (blocking) commands). These locks are independent of those applied via flock(2), but, unlike traditional POSIX fcntl() locks (F_SETLK, F_SETLKW), have semantics matching those of flock(2).
-
++
This is only available on kernel versions >= 3.15.
*--start* _offset_::
diff --git a/sys-utils/hwclock.8.adoc b/sys-utils/hwclock.8.adoc
index 350d50275..e30fb5e90 100644
--- a/sys-utils/hwclock.8.adoc
+++ b/sys-utils/hwclock.8.adoc
@@ -91,11 +91,12 @@ Set the Hardware Clock to the time given by the *--date* option, and update the
This is an alternate to the *--hctosys* function that does not read the Hardware Clock nor set the System Clock; consequently there is not any drift correction. It is intended to be used in a startup script on systems with kernels above version 2.6 where you know the System Clock has been set from the Hardware Clock by the kernel during boot.
+
It does the following things that are detailed above in the *--hctosys* function:
-
++
* Corrects the System Clock timescale to UTC as needed. Only instead of accomplishing this by setting the System Clock, *hwclock* simply informs the kernel and it handles the change.
* Sets the kernel's NTP '11 minute mode' timescale.
* Sets the kernel's timezone.
++
The first two are only available on the first call of *settimeofday*(2) after boot. Consequently this option only makes sense when used in a startup script. If the Hardware Clocks timescale configuration is changed then a reboot would be required to inform the kernel.
*-w*, *--systohc*::
@@ -166,8 +167,9 @@ This option was added in v2.26, because it is typical for systems to call *hwclo
* (Re)calculating drift factor on every shutdown delivers suboptimal results. For example, if ephemeral conditions cause the machine to be abnormally hot the drift factor calculation would be out of range.
* Significantly increased system shutdown times (as of v2.31 when not using *--update-drift* the RTC is not read).
++
Having *hwclock* calculate the drift factor is a good starting point, but for optimal results it will likely need to be adjusted by directly editing the _{ADJTIME_PATH}_ file. For most configurations once a machine's optimal drift factor is crafted it should not need to be changed. Therefore, the old behavior to automatically (re)calculate drift was changed and now requires this option to be used. See the discussion below, under *The Adjust Function*.
-
+ +
This option requires reading the Hardware Clock before setting it. If it cannot be read, then this option will cause the set functions to fail. This can happen, for example, if the Hardware Clock is corrupted by a power failure. In that case, the clock must first be set without this option. Despite it not working, the resulting drift correction factor would be invalid anyway.
*-v*, *--verbose*::
diff --git a/sys-utils/setpriv.1.adoc b/sys-utils/setpriv.1.adoc
index 79c1ec2d0..66a087b87 100644
--- a/sys-utils/setpriv.1.adoc
+++ b/sys-utils/setpriv.1.adoc
@@ -44,6 +44,7 @@ Note the following restrictions (detailed in *capabilities*(7)) regarding modifi
* A capability can be added to the ambient set only if it is currently present in both the permitted and inheritable sets.
* Notwithstanding the syntax offered by *setpriv*, the kernel does not permit capabilities to be added to the bounding set.
++
If you drop a capability from the bounding set without also dropping it from the inheritable set, you are likely to become confused. Do not do that.
*--keep-groups*::
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/8] agetty,setterm: (man) remove the mistakenly added -h and -V short options
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
2025-04-14 9:45 ` [PATCH 2/8] docs: improve and harmonize the description of -H / --list-columns Benno Schulenberg
2025-04-14 9:45 ` [PATCH 3/8] docs: fix a few indentation issues Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-14 9:45 ` [PATCH 5/8] losetup,lscpu: (man) add the missing -h/--help and -V/--version options Benno Schulenberg
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux
Three years ago, commit 2b2d317242 was a little overzealous and replaced
also occurrences of --help and --version that were *not* paired with -h
and -V: `agetty` does not know -V and uses -h for something else, and
`setterm` does not know any short options at all.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
term-utils/agetty.8.adoc | 6 +++++-
term-utils/setterm.1.adoc | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/term-utils/agetty.8.adoc b/term-utils/agetty.8.adoc
index d34bd746c..988915865 100644
--- a/term-utils/agetty.8.adoc
+++ b/term-utils/agetty.8.adoc
@@ -180,7 +180,11 @@ Run login with this priority.
*--reload*::
Ask all running *agetty* instances to reload and update their displayed prompts, if the user has not yet commenced logging in. After doing so the command will exit. This feature might be unsupported on systems without Linux *inotify*(7).
-include::man-common/help-version.adoc[]
+*--help*::
+Display help text and exit.
+
+*--version*::
+Display version and exit.
== CONFIG FILE ITEMS
*agetty* reads the _/etc/login.defs_ configuration file (see *login.defs*(5)).
diff --git a/term-utils/setterm.1.adoc b/term-utils/setterm.1.adoc
index 1e6c2f5e1..89e21532e 100644
--- a/term-utils/setterm.1.adoc
+++ b/term-utils/setterm.1.adoc
@@ -160,7 +160,11 @@ Sets the color for underlined characters. Virtual consoles only.
*--underline* **on**|**off**::
Turns underline mode on or off.
-include::man-common/help-version.adoc[]
+*--help*::
+Display help text and exit.
+
+*--version*::
+Display version and exit.
== WARNING
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/8] losetup,lscpu: (man) add the missing -h/--help and -V/--version options
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
` (2 preceding siblings ...)
2025-04-14 9:45 ` [PATCH 4/8] agetty,setterm: (man) remove the mistakenly added -h and -V short options Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-14 9:45 ` [PATCH 6/8] docs: add -h/--help and -V/--version to three man pages that lacked them Benno Schulenberg
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux
Three years ago, commit 2b2d317242 removed these options from these
two man pages but forgot to replace them with the relevant `include`.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/losetup.8.adoc | 2 ++
sys-utils/lscpu.1.adoc | 2 ++
2 files changed, 4 insertions(+)
diff --git a/sys-utils/losetup.8.adoc b/sys-utils/losetup.8.adoc
index e22e650b8..e549ddf1a 100644
--- a/sys-utils/losetup.8.adoc
+++ b/sys-utils/losetup.8.adoc
@@ -116,6 +116,8 @@ Use the raw *--list* output format.
*-J*, *--json*::
Use JSON format for *--list* output.
+include::man-common/help-version.adoc[]
+
== ENCRYPTION
*Cryptoloop is no longer supported in favor of dm-crypt.* For more details see *cryptsetup*(8).
diff --git a/sys-utils/lscpu.1.adoc b/sys-utils/lscpu.1.adoc
index f7d9ccf0d..f86f531fd 100644
--- a/sys-utils/lscpu.1.adoc
+++ b/sys-utils/lscpu.1.adoc
@@ -95,6 +95,8 @@ The CPU logical numbers are not affected by this option.
*--output-all*::
Output all available columns. This option must be combined with either *--extended*, *--parse* or *--caches*.
+include::man-common/help-version.adoc[]
+
== BUGS
The basic overview of CPU models is based on heuristics, taking into account differences such as
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 6/8] docs: add -h/--help and -V/--version to three man pages that lacked them
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
` (3 preceding siblings ...)
2025-04-14 9:45 ` [PATCH 5/8] losetup,lscpu: (man) add the missing -h/--help and -V/--version options Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-14 9:45 ` [PATCH 7/8] lastlog2: (man) fix some broken markup, and lowercase option arguments Benno Schulenberg
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux
Also, harmonize the wording and placement of these options in
a few other man pages, and use an `include` where possible.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
disk-utils/fsck.8.adoc | 2 +-
disk-utils/sfdisk.8.adoc | 6 +++---
misc-utils/kill.1.adoc | 2 ++
misc-utils/lastlog2.8.adoc | 8 ++++----
sys-utils/blkpr.8.adoc | 6 +-----
sys-utils/setsid.1.adoc | 6 +-----
sys-utils/tunelp.8.adoc | 2 ++
text-utils/line.1.adoc | 6 +++++-
8 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/disk-utils/fsck.8.adoc b/disk-utils/fsck.8.adoc
index bf6a0ec26..8631bcd79 100644
--- a/disk-utils/fsck.8.adoc
+++ b/disk-utils/fsck.8.adoc
@@ -113,7 +113,7 @@ Produce verbose output, including all filesystem-specific commands that are exec
Display help text and exit.
*--version*::
-Display version information and exit.
+Display version and exit.
== FILESYSTEM SPECIFIC OPTIONS
diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc
index 0bd04ba3e..d61a031c2 100644
--- a/disk-utils/sfdisk.8.adoc
+++ b/disk-utils/sfdisk.8.adoc
@@ -226,12 +226,12 @@ Wipe filesystem, RAID and partition-table signatures from the device, in order t
*-W*, *--wipe-partitions* _when_::
Wipe filesystem, RAID and partition-table signatures from a newly created partition, in order to avoid possible collisions. The argument _when_ can be *auto*, *never* or *always*. When this option is not given, the default is *auto*, in which case signatures are wiped only when in interactive mode and after confirmation by user. In all cases detected signatures are reported by warning messages after a new partition is created. See also *wipefs*(8) command.
-*-v*, *--version*::
-Display version information and exit.
-
*-h*, *--help*::
Display help text and exit.
+*-v*, *--version*::
+Display version and exit.
+
== INPUT FORMATS
*sfdisk* supports two input formats and generic header lines.
diff --git a/misc-utils/kill.1.adoc b/misc-utils/kill.1.adoc
index 5421fe16f..76027fb52 100644
--- a/misc-utils/kill.1.adoc
+++ b/misc-utils/kill.1.adoc
@@ -104,6 +104,8 @@ Ignored: TERM TSTP TTIN TTOU
Caught: HUP INT PIPE ALRM CHLD WINCH
....
+include::man-common/help-version.adoc[]
+
== EXIT STATUS
*kill* has the following exit status values:
diff --git a/misc-utils/lastlog2.8.adoc b/misc-utils/lastlog2.8.adoc
index 5e3289db7..fb0cf52c9 100644
--- a/misc-utils/lastlog2.8.adoc
+++ b/misc-utils/lastlog2.8.adoc
@@ -44,9 +44,6 @@ Clear last login record of a user. This option can be used only together with
*-d*, *--database _FILE_::
Use _FILE_ as lastlog2 database.
-*-h*, *--help*::
-Display help message and exit.
-
*-i*, *--import* _FILE_::
Import data from old lastlog file _FILE_. Existing entries in the lastlog2
database will be overwritten.
@@ -67,8 +64,11 @@ Print only last login records more recent than _DAYS_.
*-u*, *--users* _LOGINS_::
Print only the last login record of the user _LOGIN_.
+*-h*, *--help*::
+Display help text and exit.
+
*-v*, *--version*::
-Print version number and exit.
+Display version and exit.
If the user has never logged in the message **Never logged in** will be displayed
in the latest login time row.
diff --git a/sys-utils/blkpr.8.adoc b/sys-utils/blkpr.8.adoc
index db2b8a0a9..98983b779 100644
--- a/sys-utils/blkpr.8.adoc
+++ b/sys-utils/blkpr.8.adoc
@@ -40,11 +40,7 @@ Supported flag is *ignore-key*.
Supported types are *write-exclusive*, *exclusive-access*, *write-exclusive-reg-only*,
*exclusive-access-reg-only*, *write-exclusive-all-regs*, and *exclusive-access-all-regs*.
-*-V*, *--version*::
-Display version information and exit.
-
-*-h*, *--help*::
-Display help text and exit.
+include::man-common/help-version.adoc[]
== AUTHORS
diff --git a/sys-utils/setsid.1.adoc b/sys-utils/setsid.1.adoc
index 3eddcab79..5cf49a597 100644
--- a/sys-utils/setsid.1.adoc
+++ b/sys-utils/setsid.1.adoc
@@ -31,11 +31,7 @@ Always create a new process.
*-w*, *--wait*::
Wait for the execution of the program to end, and return the exit status of this program as the exit status of *setsid*.
-*-V*, *--version*::
-Display version information and exit.
-
-*-h*, *--help*::
-Display help text and exit.
+include::man-common/help-version.adoc[]
== AUTHORS
diff --git a/sys-utils/tunelp.8.adoc b/sys-utils/tunelp.8.adoc
index 37140b31f..c2787889d 100644
--- a/sys-utils/tunelp.8.adoc
+++ b/sys-utils/tunelp.8.adoc
@@ -56,6 +56,8 @@ This option resets the port. It requires a Linux kernel version of 1.1.80 or lat
*-q*, *--print-irq* _<on|off>_::
This option sets printing the display of the current IRQ setting.
+include::man-common/help-version.adoc[]
+
== FILES
_/dev/lp?_,
diff --git a/text-utils/line.1.adoc b/text-utils/line.1.adoc
index bed0d0d31..5ad85812d 100644
--- a/text-utils/line.1.adoc
+++ b/text-utils/line.1.adoc
@@ -17,12 +17,16 @@ line - read one line
== SYNOPSIS
-*line*
+*line* [*-h*|*-V*]
== DESCRIPTION
The utility *line* copies one line (up to a newline) from standard input to standard output. It always prints at least a newline and returns an exit status of 1 on EOF or read error.
+== OPTIONS
+
+include::man-common/help-version.adoc[]
+
== SEE ALSO
*read*(1p)
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 7/8] lastlog2: (man) fix some broken markup, and lowercase option arguments
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
` (4 preceding siblings ...)
2025-04-14 9:45 ` [PATCH 6/8] docs: add -h/--help and -V/--version to three man pages that lacked them Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-14 9:45 ` [PATCH 8/8] lastlog2: besides -v, recognize also the standard -V for --version Benno Schulenberg
2025-04-16 8:23 ` [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Karel Zak
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux; +Cc: Stefan Schubert
Also, reshuffle two paragraphs (from the end to the beginning), reword
some things, and remove the mistaken _num_ argument of --service.
Furthermore, use triple pluses to tell asciidoctor that two asterisks
in a message are literal asterisks and not markup: +++**+++.
CC: Stefan Schubert <schubi@suse.de>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/lastlog2.8.adoc | 68 +++++++++++++++++++-------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/misc-utils/lastlog2.8.adoc b/misc-utils/lastlog2.8.adoc
index fb0cf52c9..e14e6b9cc 100644
--- a/misc-utils/lastlog2.8.adoc
+++ b/misc-utils/lastlog2.8.adoc
@@ -20,49 +20,55 @@ lastlog2 - displays date of last login for all users or a specific one
== DESCRIPTION
-
-*lastlog2* displays the content of the last login database. The _login-name_,
+*lastlog2* displays the content of the last-login database. The _login-name_,
_last-login-time_, _tty_ and _remote-host_ will be printed.
-The default (no flags) causes all last login entries to be printed, sorted
-by the order as written the first time into the database.
+By default (no flags) all last-login entries are printed,
+in the order they were first written into the database.
-Compared to *lastlog* this command is Y2038 safe and uses sqlite3 to store the
-information and not a sparse file.
+If a user has never logged in, the message *+++**+++Never logged in+++**+++*
+is displayed in the last-login-time column.
+
+Only the entries for the current users of the system are displayed.
+Other entries may exist for users that have meanwhile been deleted.
+
+Compared to *lastlog*(8), this command is Y2038-safe, and uses SQLite3
+instead of a sparse file to store the information.
== OPTIONS
*-a*, *--active*::
-Print last login records excluding users who have never logged in.
+Do not print entries for users who have never logged in.
-*-b*, *--before* _DAYS_::
-Print only last login records older than _DAYS_.
+*-b*, *--before* _days_::
+Print only the last-login records older than _days_.
*-C*, *--clear*::
-Clear last login record of a user. This option can be used only together with
-*-u' (*--user*).
-
-*-d*, *--database _FILE_::
-Use _FILE_ as lastlog2 database.
-
-*-i*, *--import* _FILE_::
-Import data from old lastlog file _FILE_. Existing entries in the lastlog2
-database will be overwritten.
-
-*-r*, *--rename* _NEWNAME_::
+Clear the last-login record of a user.
This option can only be used together with *-u* (*--user*).
-*-s*, *--service* _num_::
-Display PAM service used to login in the last column.
+*-d*, *--database* _file_::
+Use _file_ as lastlog2 database.
+
+*-i*, *--import* _file_::
+Import data from an old lastlog file named _file_.
+Existing entries in the lastlog2 database will be overwritten.
+
+*-r*, *--rename* _newname_::
+Rename the user given with *-u* to this _newname_.
+This option can only be used together with *-u* (*--user*).
+
+*-s*, *--service*::
+Display the PAM service used to login in the last column.
*-S*, *--set*::
-Set last login record of a user to the current time. This option can only be used
-together with *-u* (*--user*).
+Set the last-login record of a user to the current time.
+This option can only be used together with *-u* (*--user*).
-*-t*, *--time* _DAYS_::
-Print only last login records more recent than _DAYS_.
+*-t*, *--time* _days_::
+Print only last-login records more recent than _days_.
-*-u*, *--users* _LOGINS_::
-Print only the last login record of the user _LOGIN_.
+*-u*, *--user* _login_::
+Print (or modify) the last-login record of the user _login_.
*-h*, *--help*::
Display help text and exit.
@@ -70,12 +76,6 @@ Display help text and exit.
*-v*, *--version*::
Display version and exit.
-If the user has never logged in the message **Never logged in** will be displayed
-in the latest login time row.
-
-Only the entries for the current users of the system will be displayed.
-Other entries may exist for users that were deleted previously.
-
== FILES
*/var/lib/lastlog/lastlog2.db*::
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 8/8] lastlog2: besides -v, recognize also the standard -V for --version
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
` (5 preceding siblings ...)
2025-04-14 9:45 ` [PATCH 7/8] lastlog2: (man) fix some broken markup, and lowercase option arguments Benno Schulenberg
@ 2025-04-14 9:45 ` Benno Schulenberg
2025-04-16 8:23 ` [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Karel Zak
7 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2025-04-14 9:45 UTC (permalink / raw)
To: util-linux; +Cc: Stefan Schubert
The --help text already proclaimed that -V would work.
CC: Stefan Schubert <schubi@suse.de>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
misc-utils/lastlog2.8.adoc | 6 +-----
misc-utils/lastlog2.c | 5 +++--
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/misc-utils/lastlog2.8.adoc b/misc-utils/lastlog2.8.adoc
index e14e6b9cc..8a4b604ae 100644
--- a/misc-utils/lastlog2.8.adoc
+++ b/misc-utils/lastlog2.8.adoc
@@ -70,11 +70,7 @@ Print only last-login records more recent than _days_.
*-u*, *--user* _login_::
Print (or modify) the last-login record of the user _login_.
-*-h*, *--help*::
-Display help text and exit.
-
-*-v*, *--version*::
-Display version and exit.
+include::man-common/help-version.adoc[]
== FILES
diff --git a/misc-utils/lastlog2.c b/misc-utils/lastlog2.c
index 91ba699cf..e973b5461 100644
--- a/misc-utils/lastlog2.c
+++ b/misc-utils/lastlog2.c
@@ -147,7 +147,7 @@ int main(int argc, char **argv)
{"set", no_argument, NULL, 'S'},
{"time", required_argument, NULL, 't'},
{"user", required_argument, NULL, 'u'},
- {"version", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
{NULL, 0, NULL, '\0'}
};
char *error = NULL;
@@ -163,7 +163,7 @@ int main(int argc, char **argv)
int c;
- while ((c = getopt_long(argc, argv, "ab:Cd:hi:r:sSt:u:v", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "ab:Cd:hi:r:sSt:u:vV", longopts, NULL)) != -1) {
switch (c) {
case 'a': /* active; print lastlog excluding '**Never logged in**' users */
aflg = 1;
@@ -214,6 +214,7 @@ int main(int argc, char **argv)
uflg = 1;
user = optarg;
break;
+ case 'V':
case 'v': /* version; Print version number and exit */
print_version(EXIT_SUCCESS);
break;
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer
2025-04-14 9:45 [PATCH 1/8] docs: rewrite the description of --bytes, to be clearer Benno Schulenberg
` (6 preceding siblings ...)
2025-04-14 9:45 ` [PATCH 8/8] lastlog2: besides -v, recognize also the standard -V for --version Benno Schulenberg
@ 2025-04-16 8:23 ` Karel Zak
7 siblings, 0 replies; 9+ messages in thread
From: Karel Zak @ 2025-04-16 8:23 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
On Mon, Apr 14, 2025 at 11:45:27AM +0200, Benno Schulenberg wrote:
> man-common/in-bytes.adoc | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
Applied all 8 patches, thanks!
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread