macOS / binaries /

lastcomm

/usr/bin/lastcomm
Show last commands executed in reverse order

lastcomm gives information on previously executed commands. With no arguments, lastcomm prints information about all the commands recorded during the current accounting file's lifetime.

source: man