Displaying list of last executed commands
I want to know the file where linux stores all the commands executed by perticular user.
I was knowing that command / file but at the moment I am not able to guess it.
can anybody help me please.
cheers.
James
4 Replies
i tried the command history and its working fine.
but, is there any way to find out which command is executed at which time and by whom?
cheers.
james
@james054u:
Thanks for the reply.
i tried the command history and its working fine.
but, is there any way to find out which command is executed at which time and by whom?
cheers.
james
I'm not too familiar with this because I've never done it, but I'm pretty sure that you'll want to use "bsd process accounting" for this. I think it may require a kernel option to be turned on, and I'm not sure if the Linode kernels have it enabled. You can find out by looking up the config list for your kernel on the Linode boards - search for the kernel version that you are running, you should find a list somewhere on these boards detailing what kernel options are turned on for that kernel.
Also search on google for "bsd process accounting", I think you'll probably find lots of documentation on setting this up and using it.
I don't think there will be any way for you to find out what has already happened on your Linode; setting up bsd process accounting will only help you going forward. So if you really want to know what program was already run by some user, then you may be out of luck, unless you already had bsd process accounting turned on.
@james054u:
..but, is there any way to find out which command is executed at which time and by whom?
@bji:..but I'm pretty sure that you'll want to use "bsd process accounting" for this.
GNU Accounting Utils
If you are running debian
apt-get install acct
- kenny