Hi All,
Is there a way to check command executed by users in Linux for a specific date? I know we can use history, but it doesn't shows yesterday's executed commands.
rgds,
Hi All,
Is there a way to check command executed by users in Linux for a specific date? I know we can use history, but it doesn't shows yesterday's executed commands.
rgds,
as far as i know there is no way to find commands date wise unless you made any arrangements i mean script on every time you log on and save it date wise every time you log off..
hi
i dnt know if you can see a datewise listing of executed commands, but .bash_history (this name may change), present in the home dir of the user lists the last executed commands.
You may use this file to write a script as vidyadhar85 suggested
cheers
If your shell is bash then you can set-up the environment variable HISTTIMEFORMAT with the preferred date format (see below):
export HISTTIMEFORMAT="%h/%d - %H:%M:%S "
This will enable the date and time in-front of every command in .bash_history file in your home directory.
To make this permanent, put this line in the .bashrc file.
HTH