1.\" Copyright (c) 1980, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)last.1 6.8 (Berkeley) 05/05/91 7.\" 8.Dd 9.Dt LAST 1 10.Os BSD 4 11.Sh NAME 12.Nm last 13.Nd indicate last logins of users and ttys 14.Sh SYNOPSIS 15.Nm last 16.Op Fl Ns Ar n 17.Op Fl f Ar file 18.Op Fl h Ar host 19.Op Fl t Ar tty 20.Op user ... 21.Sh DESCRIPTION 22.Nm Last 23will list the sessions of specified 24.Ar users , 25.Ar ttys , 26and 27.Ar hosts , 28in reverse time order. Each line of output contains 29the user name, the tty from which the session was conducted, any 30hostname, the start and stop times for the session, and the duration 31of the session. If the session is still continuing or was cut short by 32a crash or shutdown, 33.Nm last 34will so indicate. 35.Pp 36.Bl -tag -width indent-two 37.It Fl f Ar file 38.Nm Last 39reads the file 40.Ar file 41instead of the default, 42.Pa /var/log/wtmp . 43.It Fl Ar n 44Limits the report to 45.Ar n 46lines. 47.It Fl t Ar tty 48Specify the 49.Ar tty . 50Tty names may be given fully or abbreviated, for example, 51.Dq Li "last -t 03" 52is 53equivalent to 54.Dq Li "last -t tty03" . 55.It Fl h Ar host 56.Ar Host 57names may be names or internet numbers. 58.El 59.Pp 60If 61multiple arguments are given, the information which applies to any of the 62arguments is printed, e.g., 63.Dq Li "last root -t console" 64would list all of 65.Dq Li root Ns 's 66sessions as well as all sessions on the console terminal. If no 67users, hostnames or terminals are specified, 68.Nm last 69prints a record of 70all logins and logouts. 71.Pp 72The pseudo-user 73.Ar reboot 74logs in at reboots of the system, thus 75.Dq Li last reboot 76will give an indication of mean time between reboot. 77.Pp 78If 79.Nm last 80is interrupted, it indicates to what date the search has 81progressed. If interrupted with a quit signal 82.Nm last 83indicates how 84far the search has progressed and then continues. 85.Sh FILES 86.Bl -tag -width /var/log/wtmp -compact 87.It Pa /var/log/wtmp 88login data base 89.El 90.Sh SEE ALSO 91.Xr lastcomm 1 , 92.Xr utmp 5 , 93.Xr ac 8 94.Sh HISTORY 95.Nm Last 96appeared in 97.Bx 3.0 . 98