]>
Commit | Line | Data |
---|---|---|
6cf885d7 CW |
1 | .\"{{{}}} |
2 | .\"{{{ Title | |
3 | .TH LAST,LASTB 1 "Jul 29, 1999" "" "Linux System Administrator's Manual" | |
4 | .\"}}} | |
5 | .\"{{{ Name | |
6 | .SH NAME | |
7 | last, lastb \- show listing of last logged in users | |
8 | .\"}}} | |
9 | .\"{{{ Synopsis | |
10 | .SH SYNOPSIS | |
11 | .B last | |
12 | .RB [ \-R ] | |
13 | .RB [ \-\fInum\fP ] | |
14 | .RB "[ \-\fBn\fP \fInum\fP ]" | |
15 | .RB [ \-adiox ] | |
16 | .RB "[ \-\fBf\fP \fIfile\fP ]" | |
17 | .RI [ name... ] | |
18 | .RI [ tty... ] | |
19 | .br | |
20 | .B lastb | |
21 | .RB [ \-R ] | |
22 | .RB [ \-\fInum\fP ] | |
23 | .RB "[ \-\fBn\fP \fInum\fP ]" | |
24 | .RB "[ \-\fBf\fP \fIfile\fP ]" | |
25 | .RB [ \-adiox ] | |
26 | .RI [ name... ] | |
27 | .RI [ tty... ] | |
28 | .\"}}} | |
29 | .\"{{{ Description | |
30 | .SH DESCRIPTION | |
31 | .B Last | |
32 | searches back through the file \fB/var/log/wtmp\fP (or the file | |
33 | designated by the \fB\-f\fP flag) and displays a list of all | |
34 | users logged in (and out) since that file was created. Names of users | |
35 | and tty's can be given, in which case \fBlast\fP will show only those entries | |
36 | matching the arguments. Names of ttys can be abbreviated, thus \fBlast | |
37 | 0\fP is the same as \fBlast tty0\fP. | |
38 | .PP | |
39 | When \fBlast\fP catches a \s-2SIGINT\s0 signal (generated by the interrupt key, | |
40 | usually control-C) or a \s-2SIGQUIT\s0 signal (generated by the quit key, | |
41 | usually control-\e), \fBlast\fP will show how far it has searched through the | |
42 | file; in the case of the \s-2SIGINT\s0 signal \fBlast\fP will then terminate. | |
43 | .PP | |
44 | The pseudo user \fBreboot\fP logs in each time the system is rebooted. | |
45 | Thus \fBlast reboot\fP will show a log of all reboots since the log file | |
46 | was created. | |
47 | .PP | |
48 | \fBLastb\fP is the same as \fBlast\fP, except that by default it shows a log | |
49 | of the file \fB/var/log/btmp\fP, which contains all the bad login attempts. | |
50 | .\"}}} | |
51 | .\"{{{ Options | |
52 | .SH OPTIONS | |
53 | .IP \fB\-\fP\fInum\fP | |
54 | This is a count telling \fBlast\fP how many lines to show. | |
55 | .IP "\fB\-n\fP \fInum\fP" | |
56 | The same. | |
57 | .IP \fB\-R\fP | |
58 | Suppresses the display of the hostname field. | |
59 | .IP \fB\-a\fP | |
60 | Display the hostname in the last column. Useful in combination | |
61 | with the next flag. | |
62 | .IP \fB\-d\fP | |
63 | For non-local logins, Linux stores not only the host name of the remote | |
64 | host but its IP number as well. This option translates the IP number | |
65 | back into a hostname. | |
66 | .IP \fB\-i\fP | |
67 | This option is like \fB-d\fP in that it displays the IP number of the remote | |
68 | host, but it displays the IP number in numbers-and-dots notation. | |
69 | .IP \fB\-o\fP | |
70 | Read an old-type wtmp file (written by linux-libc5 applications). | |
71 | .IP \fB\-x\fP | |
72 | Display the system shutdown entries and run level changes. | |
73 | .\"}}} | |
74 | .SH NOTES | |
75 | The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only | |
76 | logs information in these files if they are present. This is a local | |
77 | configuration issue. If you want the files to be used, they can be | |
78 | created with a simple \fBtouch\fP(1) command (for example, | |
79 | \fItouch /var/log/wtmp\fP). | |
80 | .\"{{{ Files | |
81 | .SH FILES | |
82 | /var/log/wtmp | |
83 | .br | |
84 | /var/log/btmp | |
85 | .\"}}} | |
86 | .\"{{{ Author | |
87 | .SH AUTHOR | |
88 | Miquel van Smoorenburg, miquels@cistron.nl | |
89 | .\"}}} | |
90 | .\"{{{ See also | |
91 | .SH "SEE ALSO" | |
92 | .BR shutdown (8), | |
93 | .BR login (1), | |
94 | .BR init (8) | |
95 | .\"}}} |