Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need a live log of all the processes run by the root user, so that I can just tail the file or something, I know there is /root/.bash_history but that is not updated until the session has ended.

Is there a way I can set it up so that commands are written live to the end of a file?

share|improve this question
    
it's called a keylogger –  hbdgaf Apr 10 '12 at 3:44
    
Possible duplicate stackoverflow.com/questions/347254/… –  bodhi.zazen Apr 10 '12 at 5:01

1 Answer 1

up vote 1 down vote accepted

For commands run when logged in as root, no. However, if you require all users (and yourself) to execute with root privileges, via the sudo command, then yes. Details: http://aplawrence.com/Basics/sudo.html.

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.