looks through the file
(which records all logins/logouts) and
prints information about connect times of users. Records are printed from
most recent to least recent. Records can be specified by tty and username.
tty names can be abbreviated:
is equivalent to
Multiple arguments can be specified:
last root console
will print all of the entries for the user
and all entries logged in on the
The special users
reboot and shutdown
log in when the system reboots or
(surprise) shuts down.
will produce a record of reboot times.
is interrupted by a quit signal, it prints out how far its search
file had reached and then quits.
-n num, --lines num
Limit the number of lines that
-f filename, --file filename
Read from the file
instead of the system's
file has a problem (a time-warp, missing record, or
whatever), print out an appropriate error.
Set the time warp leniency to
seconds. Records in
files might be slightly out of order (most notably when two logins
occur within a one-second period - the second one gets written first).
By default, this value is set to 60. If the program notices this
problem, time is not assigned to users unless the
flag is used.
Set the time warp suspicious value to
seconds. If two records in the
file are farther than this number of seconds apart, there is a problem
file (or your machine hasn't been used in a year). If the program
notices this problem, time is not assigned to users unless the
flag is used.
When printing out the information, don't chop the number part off of
Print out run level changes, shutdowns, and time changes in addition to
the normal records.
Print out all records in the
Some machines store the IP address of a connection in a utmp record.
Enabling this option makes
print the IP address instead of
tries to print each entry within in 80 columns. Use this option to
to print out the fields in the
file with full field widths.
Print verbose internal information.
Print seconds when displaying dates.
Print year when displaying dates.
Prints the usage string and default locations of system files to
standard output and exits.
The system wide login record file. See
for further details.