
last(1) | last(1) |
NAME
last, lastb - indicate last logins of users and ttys
SYNOPSIS
/usr/bin/last [
/usr/bin/lastb [
DESCRIPTION
The last command searches backwards through the ®le /var/adm/wtmp (which contains a record of all logins and logouts) for information about a user, a tty, or any group of users and ttys. Arguments specify names of users or ttys of interest. The names of ttys can be given fully or abbreviated. For example, last 0 is the same as last tty0. If multiple arguments are given, the information that applies to any of the arguments is printed. For example, last root console lists all of root's sessions as well as all sessions on the console terminal. The last command prints the sessions of the speci®ed users and ttys, most recent ®rst, indicating when the session began, the duration of the session, and the tty on which the session took place. last indicates if the session is still in progress or if it was cut short by a reboot.
The
If last is interrupted, it indicates how far the search has progressed in wtmp. If interrupted by a quit signal (generated by a
The lastb command searches backwards through the database ®le /var/adm/btmp to display bad login information. Access to /var/adm/btmp should be restricted to users with appropriate privileges (owned by and readable only by root) because it may contain password information.
Options
The last and lastb commands recognize the following options and arguments:
(none) | If no arguments are speci®ed, last prints a record of all logins and logouts in reverse |
| order, most recent ®rst. |
When used with last and lastb, | |
| ®les /var/adm/wtmp and /var/adm/btmp, respectively. The host name is displayed |
| between the tty name and the user's login time. |
/var/adm/btmp .
AUTHOR
last was developed by the University of California, Berkeley and HP.
FILES
/var/adm/btmp Bad login database /var/adm/wtmp Login database
SEE ALSO login(1), utmp(4).
l
− 1 − | Section 1−421 |