2017-12-19 23:26:37 +08:00
|
|
|
# lastlog
|
|
|
|
|
|
|
|
> Show the most recent login of all users or of a given user.
|
2021-08-16 07:34:01 -03:00
|
|
|
> More information: <https://manned.org/lastlog>.
|
2017-12-19 23:26:37 +08:00
|
|
|
|
|
|
|
- Display the most recent login of all users:
|
|
|
|
|
|
|
|
`lastlog`
|
|
|
|
|
2021-10-21 22:43:38 +02:00
|
|
|
- Display the lastlog record of the specified user:
|
2017-12-19 23:26:37 +08:00
|
|
|
|
2021-10-21 22:43:38 +02:00
|
|
|
`lastlog --user {{username}}`
|
2017-12-19 23:26:37 +08:00
|
|
|
|
2021-10-21 22:43:38 +02:00
|
|
|
- Display records older than 7 days:
|
2017-12-19 23:26:37 +08:00
|
|
|
|
2023-12-30 13:04:15 -03:00
|
|
|
`lastlog --before 7`
|
2017-12-19 23:26:37 +08:00
|
|
|
|
|
|
|
- Display records more recent than 3 days:
|
|
|
|
|
2023-12-30 13:04:15 -03:00
|
|
|
`lastlog --time 3`
|