Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to find which commands have been executed between 2 specific dates (like 2 to 3 months period)?

I can use the history command, but I have powered the system on/off.

Is this possible? And how?

share|improve this question
What commands are you talking about? What is the history command? The one in Bash doesn't care whether you've powered anything on or off. – innaM Aug 19 '09 at 15:13
what ever commands i executed on terminals – joe Aug 19 '09 at 17:28
History command – joe Aug 19 '09 at 17:28
Are you using Bash? – innaM Aug 19 '09 at 19:11
up vote 9 down vote accepted

Not by default. You should install the psacct (Process Accounting) utilities to get this functionality.

sudo apt-get install acct

The ubuntu package turns on process accounting as part of the install. It provides the following commands:

  • ac - print statistics about users’ connect time
  • lastcomm - print out information about previously executed commands.
  • sa - summarizes accounting information
  • accton - turns process accounting on or off
share|improve this answer

No, not possible with the default install. If you care about the next 2 - 3 months, it is possible to set something up to track this, but not for the prior 2-3 months.

share|improve this answer
is there any other way to track on now ? – joe Aug 19 '09 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .