File: last.1

package info (click to toggle)
sysvinit 2.86.ds1-38
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 1,260 kB
  • ctags: 655
  • sloc: ansic: 7,385; sh: 4,399; makefile: 405; perl: 244
file content (101 lines) | stat: -rw-r--r-- 3,201 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.\"{{{}}}
.\"{{{  Title
.TH LAST,LASTB 1 "Jul 31, 2004" "" "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 [ \-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 Last
searches back through the file \fB/var/log/wtmp\fP (or the file
designated by the \fB\-f\fP flag) and displays a list of all
users logged in (and out) since that file was created.  Names of users
and tty's can be given, in which case \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.  
.PP
When \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.
.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 by default 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 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 is
useful, e.g., to determine easily who was logged in at a particular
time -- specify that time with \fB\-t\fP and look for "still logged
in".
.IP \fB\-R\fP
Suppresses the display of the hostname field.
.IP \fB\-a\fP
Display 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 into a hostname.
.IP \fB\-i\fP
This option is like \fB-d\fP in that it displays the IP number of the remote
host, but it displays the IP number in numbers-and-dots notation.
.IP \fB\-o\fP
Read an old-type wtmp file (written by linux-libc5 applications).
.IP \fB\-x\fP
Display the 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(1) command (for example, 
\fItouch /var/log/wtmp\fP).
.\"{{{  Files
.SH FILES
/var/log/wtmp
.br
/var/log/btmp
.\"}}}
.\"{{{  Author
.SH AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
.\"}}}
.\"{{{  See also
.SH "SEE ALSO"
.BR shutdown (8),
.BR login (1),
.BR init (8)
.\"}}}