Information Technology Reference
In-Depth Information
The last Command
The last command is used to display login and logout activity by examining
the contents of the /var/adm/wtmpx file. This is useful because it can identi-
fy users who currently are on the system and those that have been on the sys-
tem recently. The following listing shows the results of the last command.
$ last
ambro pts/6 solaris9 Thu Jul 25 18:55
still logged in ambro
root console :0 Thu Jul 25 18:49
still logged in
reboot system boot Wed Jul 24 14:18
reboot system boot Mon Jul 22 19:43
ambro pts/5 192.168.99.200 Mon Jul 22 08:27 - 08:40
ambro ftp 192.168.99.200 Sun Jul 21 20:28 - 20:28
root console :0 Sun Jul 21 17:57 - down
reboot system boot Sun Jul 21 17:56
root console :0 Sat Jul 20 14:38 - 15:03
reboot system boot Sat Jul 20 14:35
ambro pts/7 192.168.99.200 Sat Jul 13 06:52 - 06:53
ambro ftp 192.168.99.200 Thu Jul 11 13:12 - 13:13
ambro ftp solaris9-28 Thu Jul 11 13:09 - 13:10
ambro ftp 192.168.99.201 Thu Jul 11 13:08 - 13:09
root console :0 Fri Jul 5 09:22 - 14:33
reboot system boot Fri Jul 5 09:02
root console :0 Tue Jul 2 19:38 - 22:14
reboot system boot Tue Jul 2 17:36
ambro ftp 192.168.99.200 Sat Jun 29 17:55 - 17:55
root console :0 Sat Jun 29 17:53 - down
reboot system boot Sat Jun 29 17:49
root console :0 Fri Jun 21 10:17 - 23:03
reboot system boot Fri Jun 21 10:15
reboot system boot Fri Jun 14 02:11
ambro pts/6 192.168.99.200 Sat May 25 18:20 - 18:20
root console :0 Sat May 18 21:39 - down
reboot system boot Sat May 18 21:32
wtmp begins Sat May 18 21:32
$
The who Command
The who command is used to display the users currently logged into the sys-
tem and, optionally, information about processes, system reboots, and so on.
This information is obtained from the /var/adm/utmpx file. The following
listing shows the results of two who commands with different command-line
arguments:
# who
root console Jul 25 18:49 (:0)
root pts/4 Jul 25 18:50 (:0.0)
root pts/5 Jul 25 18:50 (:0.0)
ambro pts/6 Jul 25 18:55
(solaris9)
Search WWH ::




Custom Search