bash command history update before execution of command
Posted
by Jon
on Stack Overflow
See other posts from Stack Overflow
or by Jon
Published on 2010-06-07T19:49:58Z
Indexed on
2010/06/07
21:22 UTC
Read the original article
Hit count: 298
Hi,
Bash's command history is great, especially it is useful when adding the history -a
command to the COMMAND_PROMPT.
However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).
I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?
Thanks, Jon
© Stack Overflow or respective owner