Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I know that

# ps -u someUser

will print the terminal processes currently being run by a user. Is there a way to get all of the past terminal processes that user ever ran when you're logged in as the root user?

I want all the processes they ran like:

$ php update_financials.php

A command like:

cat ~someUser/.bash_history

would bring up commands I don't care about like

$ pwd

$ ls -l
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Perhaps user process accounting (as provided by the 'acct' package) might help.

Here's the URL for acct: http://www.gnu.org/software/acct/

The command you'd use is 'lastcomm' (last command).

Here's some blog entries that describe how process accounting can be used:

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.