version 1.12, 2000/03/06 03:17:38 |
version 1.13, 2000/03/08 03:11:30 |
|
|
.Nd indicate last logins of users and ttys |
.Nd indicate last logins of users and ttys |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm last |
.Nm last |
.Op Fl Ns Ar c |
.Op Fl csT |
.Op Fl Ns Ar n |
.Op Fl Ns Ar n |
.Op Fl Ns Ar s |
|
.Op Fl Ns Ar T |
|
.Op Fl f Ar file |
.Op Fl f Ar file |
.Op Fl h Ar host |
.Op Fl h Ar host |
.Op Fl t Ar tty |
.Op Fl t Ar tty |
.Op Fl d Ar [[yy]yy[mm[dd[hh]]]]mm[.ss] |
.Op Fl d Ar [[yy]yy[mm[dd[hh]]]]mm[.ss] |
.Op Ar user ... |
.Op Ar user ... |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
|
The |
.Nm last |
.Nm last |
will either (1) list the sessions of specified |
utility will either (1) list the sessions of specified |
.Ar users , |
.Ar users , |
.Ar ttys , |
.Ar ttys , |
and |
and |
.Ar hosts , |
.Ar hosts , |
in reverse time order, |
in reverse time order, |
or (2) list the users logged in at a specified snapshot date & time |
or (2) list the users logged in at a specified snapshot date & time |
in reverse time order. Each line of output contains |
in reverse time order. |
|
Each line of output contains |
the user name, the tty from which the session was conducted, any |
the user name, the tty from which the session was conducted, any |
hostname, the start and stop times for the session, and the duration |
hostname, the start and stop times for the session, and the duration |
of the session. If the session is still continuing or was cut short by |
of the session. |
|
If the session is still continuing or was cut short by |
a crash or shutdown, |
a crash or shutdown, |
.Nm last |
.Nm last |
will so indicate. |
will so indicate. |
|
.Pp |
|
The options are as follows: |
.Bl -tag -width indent-two |
.Bl -tag -width indent-two |
.It Fl c |
.It Fl c |
Calculates the total time displayed and prints it after the output. |
Calculates the total time displayed and prints it after the output. |
|
|
Limits the report to |
Limits the report to |
.Ar n |
.Ar n |
lines. |
lines. |
.It Fl Ar s |
.It Fl s |
Display time values in seconds since the epoch, instead of formatted dates. |
Display time values in seconds since the epoch, instead of formatted dates. |
.It Fl t Ar tty |
.It Fl t Ar tty |
Specify the |
Specify the |
.Ar tty . |
.Ar tty . |
tty names may be given fully or abbreviated, for example, |
tty names may be given fully or abbreviated, for example, |
.Dq Li "last -t 03" |
.Ic last -t 03 |
is |
is |
equivalent to |
equivalent to |
.Dq Li "last -t tty03" . |
.Ic last -t tty03 . |
.It Fl h Ar host |
.It Fl h Ar host |
.Ar host |
.Ar host |
names may be names or internet numbers. |
names may be names or internet numbers. |
|
|
multiple arguments are given, and a snapshot time is not specified, the |
multiple arguments are given, and a snapshot time is not specified, the |
information which applies to any of the |
information which applies to any of the |
arguments is printed, e.g., |
arguments is printed, e.g., |
.Dq Li "last root -t console" |
.Ic last root -t console |
would list all of |
would list all of |
.Dq Li root Ns 's |
.Li root Ns 's |
sessions as well as all sessions on the console terminal. If no |
sessions as well as all sessions on the console terminal. If no |
users, hostnames or terminals are specified, |
users, hostnames, or terminals are specified, |
.Nm last |
.Nm last |
prints a record of |
prints a record of |
all logins and logouts. |
all logins and logouts. |
.Pp |
.Pp |
The pseudo-user |
The pseudo-user |
.Ar reboot |
.Dq reboot |
logs in at reboots of the system; thus |
logs in at reboots of the system; thus |
.Dq Li last reboot |
.Ic last reboot |
will give an indication of mean time between reboot. |
will give an indication of mean time between reboot. |
.Pp |
.Pp |
If |
If |
.Nm last |
.Nm last |
is interrupted, it indicates to what date the search has |
is interrupted, it indicates to what date the search has |
progressed. If interrupted with a quit signal |
progressed. |
|
If interrupted with a quit signal |
.Nm last |
.Nm last |
indicates how |
indicates how |
far the search has progressed and then continues. |
far the search has progressed and then continues. |