Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

last(1) [mojave man page]

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

NAME
last -- indicate last logins of users and ttys SYNOPSIS
last [-n] [-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. -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) 						    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
Man Page

14 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

License Expired

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

2. IP Networking

Quad Fast Ethernet Card on Sparc 10?

I am having a problem getting my configuration to stick. After I installed my quad-card I did the following: 1. created hostname.qe0, hostname.qe1, hostname.qe2, hostname.qe3 files in my /etc directory. 2. In my /etc/hosts file I added the ip address of each interface and the name for each... (7 Replies)
Discussion started by: jskillet
7 Replies

3. 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

4. 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

5. 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

6. 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

7. 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

8. UNIX for Advanced & Expert Users

Core create as "not a tty"

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

9. Shell Programming and Scripting

help splitting a file into multiple files in bash

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

10. 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

11. 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

12. Shell Programming and Scripting

read lines between search pattern

I have a file split something like 01/11/2010: No of users 100 02/11/2010: No of users 102 03/11/2010: 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)
Discussion started by: gefa
6 Replies

13. 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

14. Solaris

How to search for the sessions that have a certain environment variable set?

Hi all, In Solaris 10, is there a way to search for the sessions that have a certain environment variable set? (8 Replies)
Discussion started by: ejianu
8 Replies