On Tue, 2006-03-07 at 03:46 +0100, Tim Kruse wrote:
> * On 07.03.2006 Haim Ashkenazi wrote:
> 
> >> I am wondering what do I need to config so that when a user or root
> >> type reboot the commands typed before a saved in bash_history and also
> >> when the user or root don' type anything but just press combination of
> >> keys ctrl+alt+del?
> > when you press reboot the shell process dies, so it doesn't save the
> > history. if you want to save history you have to exit the shell and then
> > login and enter reboot, or press ctrl+alt+del.
check out also the history command in bash ('help history'). it has some
commands to write or append the current history to a file (I never used
it, just looked at the man page).

if it works you can have alias to 'history -a $HISTFILE
&& /sbin/reboot'. of course you have to check the history options.

Bye
-- 
Haim

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to