1. Computing & Technology
Linux / Unix Command: lastlog
Command Library

NAME

lastlog - examine lastlog file  

SYNOPSIS

lastlog [<-u|--user> login-name]
[<-t|--time> days] [<-h|--help>]
 

DESCRIPTION

lastlog formats and prints the contents of the last login log /var/log/lastlog file . The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by the numerical UID.

-u, --user login-name will cause the lastlog record for
login-name only to be printed
-t, --time days will cause only the lastlogins more recent
han fIdays to be printed
-h, --help print a one-line help message and exit.
.TP The -t flag overrides the use of -u.

If the user has never logged in the message "**Never logged in**" will be displayed instead of the port and time.  


Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.