lastcomm - Outputs information about the last commands executed
lastcomm [Command] [Name] [Tty]
The lastcomm command outputs information about all previously executed commands that are recorded in the /var/adm/pacct file in reverse chronological order.
You may specify a particular command with the Command parameter, a particular user with the Name parameter, and a particular terminal as the command source with the Tty parameter. Output is then restricted to the specified parameters. A Tty terminal may be named fully (for example, tty0) or abbreviated (for example, 0).
The following information is displayed for each process: Name of the command under which the process was called. Any flags collected when the command was executed. The following flags are valid: Command was run with an effective user-id of 0. Command ran after a fork, but without an exec system call following it. Name of the user who issued the command. The terminal the command was started from. Seconds of CPU time used. Time the process started.
Commands: last(8) delim off