LAST(1) General Commands Manual LAST(1)NAME
last - indicate last logins of users and teletypes
last [ -f filename ] [ -N ] [ name ... ] [ tty ... ]
Last will look back in the wtmp file which records all logins and logouts for information about a user, a teletype or any group of users
and teletypes. Arguments specify names of users or teletypes of interest. Names of teletypes may be given fully or abbreviated. For
example `last 0' is the same as `last tty0'. If multiple arguments are given, the information which applies to any of the arguments is
printed. For example `last root console' would list all of "root's" sessions as well as all sessions on the console terminal. Last will
print the sessions of the specified users and teletypes, most recent first, indicating the times at which the session began, the duration
of the session, and the teletype which the session took place on. If the session is still continuing or was cut short by a reboot, last so
The pseudo-user reboot logs in at reboots of the system, thus
will give an indication of mean time between reboot.
Last with no arguments prints a record of all logins and logouts, in reverse order. The -f filename option allows the user to examine an
alternate wtmp file. The -N option limits the report to N lines.
If last is interrupted, it indicates how far the search has progressed in wtmp. If interrupted with a quit signal (generated by a con-
trol-) last indicates how far the search has progressed so far, and the search continues.
/usr/adm/wtmp login data base
/usr/adm/shutdownlog which records shutdowns and reasons for same
SEE ALSO wtmp(5), ac(8), lastcomm(1)AUTHOR
4th Berkeley Distribution April 29, 1985 LAST(1)
Check Out this Related Man Page
LAST(1) BSD General Commands Manual LAST(1)NAME
last -- indicate last logins of users and ttys
last [-n] [-f file] [-h host] [-t tty] [user ...]
Last will list the sessions of specified users, ttys, and hosts, in reverse time order. Each line of output contains the user name, the tty
from which the session was conducted, any hostname, the start and stop times for the session, and the duration of the session. If the ses-
sion is still continuing or was cut short by a crash or shutdown, last will so indicate.
-f file Last reads the file file instead of the default, /var/log/wtmp.
-n Limits the report to n lines.
-t tty Specify the tty. Tty names may be given fully or abbreviated, for example, ``last -t 03'' is equivalent to ``last -t tty03''.
-h host Host names may be names or internet numbers.
If multiple arguments are given, the information which applies to any of the arguments is printed, e.g., ``last root -t console'' would list
all of ``root's'' sessions as well as all sessions on the console terminal. If no users, hostnames or terminals are specified, last prints a
record of all logins and logouts.
The pseudo-user reboot logs in at reboots of the system, thus ``last reboot'' will give an indication of mean time between reboot.
If last is interrupted, it indicates to what date the search has progressed. If interrupted with a quit signal last indicates how far the
search has progressed and then continues.
/var/log/wtmp login data base
SEE ALSO lastcomm(1), utmp(5), ac(8)HISTORY
Last appeared in 3.0BSD.
4th Berkeley Distribution June 6, 1993 4th Berkeley Distribution
I have AIX5.1
I have been trying to learn how to truncate the /var/adm/wtmp file.
I have seen several things on google actually but don't quite understand. I also searched your forums but couldn't find it.
one says this ">/var/adm/wtmp
Is that all I do?
I have a seperate question also. I was... (1 Reply)
Hi - How can I determine the time my system was last booted when my "wtmp" file is broken? (It is being cleaned out incorrectly, I'mm working on that issue)
uptime shows invalid details and who -b shows "nothing at all"
is there a shutdown log somewhere that may indicat the last re-boot? (3 Replies)
I want to apply patches in multiuser mode but stop logins of other users while I do it?
What is the best way to do this?
I will be connected to the system via a putty session over a serial cable from another system (console is messed up)...
Should I put in a dummy passwd and shadow file... (7 Replies)
will reboot -- -r update boot_archive ?
this is the what I see on my console.
# reboot -- -r
15+0 records in
15+0 records out
syncing file systems... done
It doesn't say updating /platform/sun4u/boot_archive as it displayed on my console after init 0or init 6 ? (3 Replies)
thanks for your kind assistance. I have a rhel6.4 server. After I did an update, the server does not reboot. Also user logins take for ever.
Please any help on this matter will be appreciated .
Thank you (2 Replies)
The telnet sessions stay as idle users. It is not getting kicked out.
Please advise what could be the issue. only when we reboot the server these telnet sessions goes.
Below is the current output from the server. we rebooted the server three days ago:
04:21PM... (8 Replies)