Logs – User’s Executed Commands Log File

command historylogsmonitoring

In Unix based systems, is there a log file that stores user's executed command(s)?

Best Answer

Given that you want to track all user commands, you should look at the acct package on your system (on some systems this is also called "process accounting" or psacct). Then after it's been turned on, you can run the lastcomm command to show what programs have been run, by whom, when and for how long. From Google, search "linux acct" for more details.

http://beginlinux.com/blog/2010/01/monitoring-user-activity-with-psacct-or-acct/

http://www.cyberciti.biz/tips/howto-log-user-activity-using-process-accounting.html

Related Question