1b3b01ff3SRuslan Ermilov.\" $NetBSD: lastlogin.8,v 1.3 1998/02/06 06:20:39 perry Exp $ 2b3b01ff3SRuslan Ermilov.\" 3b3b01ff3SRuslan Ermilov.\" Copyright (c) 1996 John M. Vinopal 4b3b01ff3SRuslan Ermilov.\" All rights reserved. 5b3b01ff3SRuslan Ermilov.\" 6b3b01ff3SRuslan Ermilov.\" Redistribution and use in source and binary forms, with or without 7b3b01ff3SRuslan Ermilov.\" modification, are permitted provided that the following conditions 8b3b01ff3SRuslan Ermilov.\" are met: 9b3b01ff3SRuslan Ermilov.\" 1. Redistributions of source code must retain the above copyright 10b3b01ff3SRuslan Ermilov.\" notice, this list of conditions and the following disclaimer. 11b3b01ff3SRuslan Ermilov.\" 2. Redistributions in binary form must reproduce the above copyright 12b3b01ff3SRuslan Ermilov.\" notice, this list of conditions and the following disclaimer in the 13b3b01ff3SRuslan Ermilov.\" documentation and/or other materials provided with the distribution. 14b3b01ff3SRuslan Ermilov.\" 3. All advertising materials mentioning features or use of this software 15b3b01ff3SRuslan Ermilov.\" must display the following acknowledgement: 16b3b01ff3SRuslan Ermilov.\" This product includes software developed for the NetBSD Project 17b3b01ff3SRuslan Ermilov.\" by John M. Vinopal. 18b3b01ff3SRuslan Ermilov.\" 4. The name of the author may not be used to endorse or promote products 19b3b01ff3SRuslan Ermilov.\" derived from this software without specific prior written permission. 20b3b01ff3SRuslan Ermilov.\" 21b3b01ff3SRuslan Ermilov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22b3b01ff3SRuslan Ermilov.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23b3b01ff3SRuslan Ermilov.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24b3b01ff3SRuslan Ermilov.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25b3b01ff3SRuslan Ermilov.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26b3b01ff3SRuslan Ermilov.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27b3b01ff3SRuslan Ermilov.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28b3b01ff3SRuslan Ermilov.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29b3b01ff3SRuslan Ermilov.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30b3b01ff3SRuslan Ermilov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31b3b01ff3SRuslan Ermilov.\" SUCH DAMAGE. 32b3b01ff3SRuslan Ermilov.\" 33427b88d7SPhilip Paeps.Dd August 28, 2018 34b3b01ff3SRuslan Ermilov.Dt LASTLOGIN 8 35b3b01ff3SRuslan Ermilov.Os 36b3b01ff3SRuslan Ermilov.Sh NAME 37b3b01ff3SRuslan Ermilov.Nm lastlogin 38b3b01ff3SRuslan Ermilov.Nd indicate last login time of users 39b3b01ff3SRuslan Ermilov.Sh SYNOPSIS 40b3b01ff3SRuslan Ermilov.Nm 41427b88d7SPhilip Paeps.Op Fl -libxo 4205c67f22SEd Schouten.Op Fl f Ar file 4305c67f22SEd Schouten.Op Fl rt 44d2d06762SRuslan Ermilov.Op Ar user ... 45b3b01ff3SRuslan Ermilov.Sh DESCRIPTION 46490d5836SPhilippe CharnierThe 47b3b01ff3SRuslan Ermilov.Nm 48490d5836SPhilippe Charnierutility will list the last login session of each specified 49d2d06762SRuslan Ermilov.Ar user , 5007bfccd7SRuslan Ermilovor for all users by default. 5107bfccd7SRuslan ErmilovEach line of output contains 52b3b01ff3SRuslan Ermilovthe user name, the tty from which the session was conducted, any 53b3b01ff3SRuslan Ermilovhostname, and the start time for the session. 54b3b01ff3SRuslan Ermilov.Pp 55d2d06762SRuslan ErmilovIf more than one 56d2d06762SRuslan Ermilov.Ar user 57d2d06762SRuslan Ermilovis given, the session information for each user is printed in 5807bfccd7SRuslan Ermilovthe order given on the command line. 5905c67f22SEd SchoutenOtherwise, information for all users is printed. 6005c67f22SEd SchoutenBy default, the entries are sorted by user name. 61b3b01ff3SRuslan Ermilov.Pp 62490d5836SPhilippe CharnierThe 63b3b01ff3SRuslan Ermilov.Nm 64490d5836SPhilippe Charnierutility differs from 65b3b01ff3SRuslan Ermilov.Xr last 1 66b3b01ff3SRuslan Ermilovin that it only prints information regarding the very last login session. 67b3b01ff3SRuslan ErmilovThe last login database is never turned over or deleted in standard usage. 6805c67f22SEd Schouten.Pp 6905c67f22SEd SchoutenThe following options are available: 7005c67f22SEd Schouten.Bl -tag -width indent 71427b88d7SPhilip Paeps.It Fl -libxo 72427b88d7SPhilip PaepsGenerate output via 73427b88d7SPhilip Paeps.Xr libxo 3 74427b88d7SPhilip Paepsin a selection of different human and machine readable formats. 75427b88d7SPhilip PaepsSee 76427b88d7SPhilip Paeps.Xr xo_parse_args 3 77427b88d7SPhilip Paepsfor details on command line arguments. 7805c67f22SEd Schouten.It Fl f Ar file 7905c67f22SEd SchoutenOpen last login database 8005c67f22SEd Schouten.Ar file 8105c67f22SEd Schouteninstead of the system-wide database. 8205c67f22SEd Schouten.It Fl r 8305c67f22SEd SchoutenPrint the entries in reverse sorted order. 8405c67f22SEd Schouten.It Fl t 8505c67f22SEd SchoutenSort the elements by last login time, instead of user name. 8605c67f22SEd Schouten.El 87b3b01ff3SRuslan Ermilov.Sh FILES 880806dd92SEd Schouten.Bl -tag -width /var/log/utx.lastlogin -compact 890806dd92SEd Schouten.It Pa /var/log/utx.lastlogin 90b3b01ff3SRuslan Ermilovlast login database 91b3b01ff3SRuslan Ermilov.El 92b3b01ff3SRuslan Ermilov.Sh SEE ALSO 93b3b01ff3SRuslan Ermilov.Xr last 1 , 940806dd92SEd Schouten.Xr getutxent 3 , 95427b88d7SPhilip Paeps.Xr libxo 3 , 96*6e1fc011SGraham Percival.Xr xo_parse_args 3 , 97*6e1fc011SGraham Percival.Xr ac 8 98b3b01ff3SRuslan Ermilov.Sh AUTHORS 99427b88d7SPhilip Paeps.An -nosplit 100b3b01ff3SRuslan Ermilov.An John M. Vinopal 101b3b01ff3SRuslan Ermilovwrote this program in January 1996 and contributed it 102b3b01ff3SRuslan Ermilovto the 103b3b01ff3SRuslan Ermilov.Nx 104b3b01ff3SRuslan Ermilovproject. 105427b88d7SPhilip Paeps.An Philip Paeps added 106427b88d7SPhilip Paeps.Xr libxo 3 107427b88d7SPhilip Paepssupport in August 2018. 108