Displaying the year with the last command

The complete timestamp of user logins and logouts is stored in /var/adm/wtmpx, but the last command, at least on the Solaris 9 system in this example, does not display the year in its output.

The easiest way to display the year from wtmpx data is to compile and execute utxreader. You may download a compiled version that works on Solaris 8, 9, and 10.


$ last test_user
test_user   pts/2     Fri Jan 27 11:31 - 11:31  (00:00)

$ ./utxreader /var/adm/wtmpx | grep test_user

More information:
ITworld.com - Looking for last logins

Back to brandonhutchinson.com.
Last modified: 2007/10/19