Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

last(1) [opendarwin man page]

LAST(1) 						    BSD General Commands Manual 						   LAST(1)

NAME
last -- indicate last logins of users and ttys SYNOPSIS
last [-n] [-f file] [-h host] [-t tty] [user ...] DESCRIPTION
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. FILES
/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

Check Out this Related Man Page

LAST(1) 						      General Commands Manual							   LAST(1)

NAME
last - indicate last logins of users and teletypes SYNOPSIS
last [ -f filename ] [ -N ] [ name ... ] [ tty ... ] DESCRIPTION
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 indicates. The pseudo-user reboot logs in at reboots of the system, thus last reboot 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. FILES
/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
Howard Katseff 4th Berkeley Distribution April 29, 1985 LAST(1)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need Wtmp Reader

I would loke to read the WTMP file. This is a binary file in the /var/logs directory. Is there any utility which will convert this binary file to ASCII format? (1 Reply)
Discussion started by: pgold1
1 Replies

2. UNIX for Advanced & Expert Users

Dead pseudo-ttys

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)
Discussion started by: markat2k
1 Replies

3. Shell Programming and Scripting

Logins-logouts

I want a script that checks the logins and logouts in a system.Is there a way to keep the logins and logouts in files and then compare them every e.g. 10 seconds? for tcsh. (1 Reply)
Discussion started by: aekaramg20
1 Replies

4. Shell Programming and Scripting

Sorting Question

Hi All 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 Code: #!/bin/bash #This Shell Script... (3 Replies)
Discussion started by: The Owl
3 Replies

5. UNIX for Advanced & Expert Users

Send console message to all users and tty

Hi people, 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. Someone know? Thanks a lot (2 Replies)
Discussion started by: gfca
2 Replies

6. Solaris

stay in multi user mode but stop logins to system?

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)
Discussion started by: NewSolarisAdmin
7 Replies

7. AIX

all pseudo ttys busy, AIX 5.2

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)
Discussion started by: lacroix
3 Replies

8. Solaris

Can we spy a tty session?

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. ex: ... (7 Replies)
Discussion started by: plmachiavel
7 Replies

9. AIX

Telnet sessions stay as idle users

Hi 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: pmut6:/> uptime 04:21PM... (8 Replies)
Discussion started by: newtoaixos
8 Replies