69 lines
2.0 KiB
Groff
69 lines
2.0 KiB
Groff
.\" Title: lastlog
|
|
.\" Author:
|
|
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
|
.\" Date: 06/06/2006
|
|
.\" Manual: System Management Commands
|
|
.\" Source: System Management Commands
|
|
.\"
|
|
.TH "LASTLOG" "8" "06/06/2006" "System Management Commands" "System Management Commands"
|
|
.\" disable hyphenation
|
|
.nh
|
|
.\" disable justification (adjust text to left margin only)
|
|
.ad l
|
|
.SH "NAME"
|
|
lastlog \- examine lastlog file
|
|
.SH "SYNOPSIS"
|
|
.HP 8
|
|
\fBlastlog\fR [\fIoptions\fR]
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
|
|
\fBlastlog\fR
|
|
formats and prints the contents of the last login log
|
|
\fI/var/log/lastlog\fR
|
|
file. The
|
|
\fIlogin\-name\fR,
|
|
\fIport\fR, and
|
|
\fIlast login time\fR
|
|
will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in
|
|
\fI/etc/passwd\fR.
|
|
.SH "OPTIONS"
|
|
.PP
|
|
The options which apply to the
|
|
\fBlastlog\fR
|
|
command are:
|
|
.TP 3n
|
|
\fB\-b\fR, \fB\-\-before\fR \fIDAYS\fR
|
|
Print only lastlog records older than
|
|
\fIDAYS\fR.
|
|
.TP 3n
|
|
\fB\-h\fR, \fB\-\-help\fR
|
|
Display help message and exit.
|
|
.TP 3n
|
|
\fB\-t\fR, \fB\-\-time\fR \fIDAYS\fR
|
|
Print the lastlog records more recent than
|
|
\fIDAYS\fR.
|
|
.TP 3n
|
|
\fB\-u\fR, \fB\-\-user\fR \fILOGIN\fR
|
|
Print the lastlog record for user with specified
|
|
\fILOGIN\fR
|
|
only.
|
|
.TP 3n
|
|
The \fB\-t\fR flag overrides the use of \fB\-u\fR.
|
|
.PP
|
|
If the user has never logged in the message
|
|
\fI** Never logged in**\fR
|
|
will be displayed instead of the port and time.
|
|
.SH "NOTE"
|
|
.PP
|
|
The
|
|
\fIlastlog\fR
|
|
file is a database which contains info on the last login of each user. You should not rotate it. It is a sparse file, so its size on the disk is much smaller than the one shown by "\fBls \-l\fR" (which can indicate a really big file if you have a high UID). You can display its real size with "\fBls \-s\fR".
|
|
.SH "FILES"
|
|
.TP 3n
|
|
\fI/var/log/lastlog\fR
|
|
Database times of previous user logins.
|
|
.SH "CAVEATS"
|
|
.PP
|
|
Large gaps in UID numbers will cause the lastlog program to run longer with no output to the screen (i.e. if mmdf=800 and last UID=170, program will appear to hang as it processes UID 171\-799).
|