.\"{{{}}} .\"{{{ Title .TH LAST,LASTB 1 "March 11, 1996" "" "Linux System Administrator's Manual" .\"}}} .\"{{{ Name .SH NAME last, lastb \- show listing of last logged in users .\"}}} .\"{{{ Synopsis .SH SYNOPSIS .B last .RB [ \-R ] .RB [ \-\fInum\fP ] .RB "[ \-\fBn\fP \fInum\fP ]" .RB [ \-adx ] .RB "[ \-\fBf\fP \fIfile\fP ]" .RI [ name... ] .RI [ tty... ] .br .B lastb .RB [ \-R ] .RB [ \-\fInum\fP ] .RB "[ \-\fBn\fP \fInum\fP ]" .RB "[ \-\fBf\fP \fIfile\fP ]" .RB [ \-adx ] .RI [ name... ] .RI [ tty... ] .\"}}} .\"{{{ Description .SH DESCRIPTION .B Last searches back through the file \fB/var/log/wtmp\fP (or the file designated by the \fB\-f\fP flag) to show a list of all users logged in (and out) since that file was created. Names of users and tty's can be given, and then \fBlast\fP will show only those entries matching the arguments. Names of ttys can be abbreviated, thus \fBlast 0\fP is the same as \fBlast tty0\fP. When \fBlast\fP catches a \s-2SIGINT\s0 (generated by the interrupt key, usually control-C) or a \s-2SIGQUIT\s0 (generated by the quit key, usually control-\e) \fBlast\fP will show how far it was searching through the file and in the case of \s-2SIGINT\s0 \fBlast\fP will terminate. .PP The pseudo user \fBreboot\fP logs in each time the system is rebooted. Thus \fBlast reboot\fP will show a log of all reboots since the log file was created. .PP \fBLastb\fP is the same as \fBlast\fP, except that it shows a log of the file \fB/var/log/btmp\fP which contains all the bad login attempts. .\"}}} .\"{{{ Options .SH OPTIONS .IP \fB\-\fP\fInum\fP This is a count telling \fBlast\fP howmany lines to show. .IP "\fB\-n\fP \fInum\fP" The same. .IP \fB\-R\fP With this flag, the \fBhostname\fP field will not be shown. .IP \fB\-a\fP Makes \fBlast\fP show the hostname in the last column. Useful in combination with the next flag. .IP \fB\-d\fP For non-local logins, Linux stores not only the host name of the remote host but its IP number as well. This option translates the IP number back to a hostname. .IP \fB\-x\fP This flag causes last to also show system shutdown entries and run level changes. .\"}}} .SH NOTES The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only logs information in these files if they are present. This is a local configuration issue. If you want the files to be used, they can be created with a simple \fBtouch\fP command (for example, \fItouch /var/log/wtmp\fP). .\"{{{ Author .SH AUTHOR Miquel van Smoorenburg, miquels@cistron.nl .\"}}} .\"{{{ See also .SH "SEE ALSO" shutdown(8), login(1), init(8) .\"}}}