📄 last.1
字号:
.\"{{{}}}.\"{{{ Title.TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual".\"}}}.\"{{{ Name.SH NAMElast, lastb \- show listing of last logged in users.\"}}}.\"{{{ Synopsis.SH SYNOPSIS.B last.RB [ \-R ].RB [ \-\fInum\fP ].RB "[ \-\fBn\fP \fInum\fP ]".RB [ \-adiox ].RB "[ \-\fBf\fP \fIfile\fP ]".RB "[ \-\fBt\fP \fIYYYYMMDDHHMMSS\fP ]".RI [ name... ].RI [ tty... ].br.B lastb.RB [ \-R ].RB [ \-\fInum\fP ].RB "[ \-\fBn\fP \fInum\fP ]".RB "[ \-\fBf\fP \fIfile\fP ]".RB [ \-adiox ].RI [ name... ].RI [ tty... ].\"}}}.\"{{{ Description.SH DESCRIPTION.B Lastsearches back through the file \fB/var/log/wtmp\fP (or the filedesignated by the \fB\-f\fP flag) and displays a list of allusers logged in (and out) since that file was created. Names of usersand tty's can be given, in which case \fBlast\fP will show only those entriesmatching the arguments. Names of ttys can be abbreviated, thus \fBlast0\fP is the same as \fBlast tty0\fP. .PPWhen \fBlast\fP catches a \s-2SIGINT\s0 signal (generated by the interrupt key,usually control-C) or a \s-2SIGQUIT\s0 signal (generated by the quit key, usually control-\e), \fBlast\fP will show how far it has searched through the file; in the case of the \s-2SIGINT\s0 signal \fBlast\fP will then terminate..PPThe 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 filewas created..PP\fBLastb\fP is the same as \fBlast\fP, except that by default it shows a logof the file \fB/var/log/btmp\fP, which contains all the bad login attempts..\"}}}.\"{{{ Options.SH OPTIONS.IP \fB\-\fP\fInum\fPThis is a count telling \fBlast\fP how many lines to show..IP "\fB\-n\fP \fInum\fP"The same..IP "\fB\-t\fP \fIYYYYMMDDHHMMSS\fP"Display the state of logins as of the specified time. This isuseful, e.g., to determine easily who was logged in at a particulartime -- specify that time with \fB\-t\fP and look for "still loggedin"..IP \fB\-R\fPSuppresses the display of the hostname field..IP \fB\-a\fPDisplay the hostname in the last column. Useful in combinationwith the next flag..IP \fB\-d\fPFor non-local logins, Linux stores not only the host name of the remotehost but its IP number as well. This option translates the IP numberback into a hostname..IP \fB\-i\fPThis option is like \fB-d\fP in that it displays the IP number of the remotehost, but it displays the IP number in numbers-and-dots notation..IP \fB\-o\fPRead an old-type wtmp file (written by linux-libc5 applications)..IP \fB\-x\fPDisplay the system shutdown entries and run level changes..\"}}}.SH NOTESThe files \fIwtmp\fP and \fIbtmp\fP might not be found. The system onlylogs information in these files if they are present. This is a localconfiguration issue. If you want the files to be used, they can becreated with a simple \fBtouch\fP(1) command (for example, \fItouch /var/log/wtmp\fP)..\"{{{ Files.SH FILES/var/log/wtmp.br/var/log/btmp.\"}}}.\"{{{ Author.SH AUTHORMiquel van Smoorenburg, miquels@cistron.nl.\"}}}.\"{{{ See also.SH "SEE ALSO".BR shutdown (8),.BR login (1),.BR init (8).\"}}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -