LAST(1) BSD General Commands Manual LAST(1)NAME
last -- indicate last logins of users and ttys
last [-n] [-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.
-n Limits the report to n lines.
-h host Host names may be names or internet numbers.
-t tty Specify the tty. Tty names may be given fully or abbreviated, for example, ``last -t 03'' is equivalent to ``last -t tty03''.
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.
SEE ALSO lastcomm(1), utmpx(5), ac(8)HISTORY
Last appeared in 3.0BSD.
4th Berkeley Distribution June 6, 1993 4th Berkeley Distribution
Check Out this Related Man Page
last(1) General Commands Manual last(1)Name
last - indicate last logins of users and teletypes
last [-N] [name...] [tty...]
The command looks back in the 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 can be given fully or abbreviated. For
example `last 0' is the same as `last tty0'.
If multiple arguments are given, the information that applies to any of the arguments is printed. For example, `last root console' lists
all of "root's" sessions as well as all sessions on the console terminal.
The command prints 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 on which the session took place. If the session is ongoing or was cut short by a reboot,
indicates that this is so.
The pseudo-user reboot logs in at reboots of the system. Therefore, the following example gives an indication of mean time between reboot:
The command with no arguments prints a record of all logins and logouts, in reverse order.
If is interrupted, it indicates how far the search has progressed in If interrupted with a quit signal (generated by a <CTRL/E>) indicates
how far the search has progressed so far, and the search continues.
Options-N Limits the number of output lines to the specified number.
login data base
records that shutdowns occurred and why
See Alsowtmp(5), ac(8), lastcomm(1)last(1)
I´m working with a SCO system and during a reboot i accidentally change the date system. Now when i try to establish a telnet session the system reject me saying that the license has expired.
Is there any way to solve this problem?
Thanks (1 Reply)
We are having a problem on an AIX 4.3 system, whereby users somehow exit the system in a way such that their process continues to run.
In the who listing, the user may or may not be listed. Processes are still listed in ps, and are still assigned to the pseudo-tty. Processes continue to... (1 Reply)
I have a CSV file where 3rd and 4th fields are date and time
it's a session log file printing the date and time per session
Now, I want to create a statistics of how many sessions per date and Time
I managed a script for sessions per hour
#This Shell Script... (3 Replies)
i tried to search in the forum... but didnt found the answer...
Sometimes i need to send a console message to all users in all tty, like reboot or shutdown does...
But i cant find how to do that.
Thanks a lot (2 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)
When a process aborted , it created a core like
-rw-r--r-- 1 root root 2 Mar 19 14:34 not a tty
This happens very less often, was not able to determine the exact problem.
My doubt is that is it possible to actually create a core "not a tty" ?
What can be the possible... (3 Replies)
I have a file that logs multiple sessions. What I would like to do is split this file inclusive of the lines that include "starting session" and "shutting down" and ignore the data before and after the beginning of the first session and the end of the last session. The output files can be called... (2 Replies)
I have several users connecting via a Windows-based SSH\telnet client. The previous sysadmin used FacetTerm to allow certain users to switch between multiple "windows." I'm told there are AIX-native ways to do this but I work with what I inherited.
Originally, many users were still connecting... (3 Replies)
First of all, in no way I want to use this to hack / cheat / steal etc ...
I am an admin of a couple of hundred users which are 99,8% > 500miles away from me and to facilitate some administration part I would like to be able to "spy" what they are doing in there sessions, live.
... (7 Replies)
I have a file split something like
No of users 100
No of users 102
No of users 99
I want to search the file for a particular date and then extract the following line with the date, something like
02/11/2010 No of users 102
I can grep... (6 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)