]> git.ipfire.org Git - thirdparty/util-linux.git/blame - misc-utils/lastlog2.8.adoc
Merge branch 'sed' of https://github.com/t-8ch/util-linux
[thirdparty/util-linux.git] / misc-utils / lastlog2.8.adoc
CommitLineData
c2e299d0
SS
1//po4a: entry man manual
2////
3Copyright 2023 Thorsten Kukuk (kukuk@suse.de)
4This file may be copied under the terms of the GNU Public License.
5////
6= lastlog2(8)
7:doctype: manpage
8:man manual: User Commands
9:man source: util-linux {release-version}
10:page-layout: base
11:command: lastlog2
12
13== NAME
14
15lastlog2 - display date of last login for all users or a specific one
16
17== SYNOPSIS
18
19*lastlog2* [options]
20
21== DESCRIPTION
22
23
24*lastlog2* displays the content of the last login database. The _login-name_,
25_last-login-time_, _tty_ and _remote-host_ will be printed.
26The default (no flags) causes all last login entries to be printed, sorted
27by the order as written the first time into the database.
28
29Compared to *lastlog* this command is Y2038 safe and uses sqlite3 to store the
30information and not a sparse file.
31
32== OPTIONS
33
34*-b*, *--before* _DAYS_::
35Print only last login records older than _DAYS_.
36
37*-C*, *--clear*::
38Clear last login record of a user. This option can be used only together with
39*-u' (*--user*).
40
41*-d*, *--database _FILE_::
42Use _FILE_ as lastlog2 database.
43
44*-h*, *--help*::
45Display help message and exit.
46
47*-i*, *--import* _FILE_::
48Import data from old lastlog file _FILE_. Existing entries in the lastlog2
49database will be overwritten.
50
51*-r*, *--rename* _NEWNAME_::
52This option can only be used together with *-u* (*--user*).
53
54*-s*, *--servive* _num_::
55Display PAM service used to login in the last column.
56
57*-S*, *--set*::
58Set last login record of a user to the current time. This option can only be used
59together with *-u* (*--user*).
60
61*-t*, *--time* _DAYS_::
62Print only last login records more recent than _DAYS_.
63
64*-u*, *--users* _LOGINS_::
65Print only the last login record of the user _LOGIN_.
66
67*-v*, *--version*::
68Print version number and exit.
69
70If the user has never logged in the message **Never logged in** will be displayed
71in the latest login time row.
72
73Only the entries for the current users of the system will be displayed.
74Other entries may exist for users that were deleted previously.
75
76== FILES
77
78*/var/lib/lastlog/lastlog2.db*::
79Lastlog2 logging database file
80
81
82== AUTHORS
83
84lastlog2 was written by Thorsten Kukuk for *liblastlog2*(3).
85
86== SEE ALSO
87
88*liblastlog2*(3)
89
90include::man-common/bugreports.adoc[]
91
92include::man-common/footer.adoc[]
93
94ifdef::translation[]
95include::man-common/translation.adoc[]
96endif::[]