Re: Tastatureingaben per Shell mit loggen?
Am Tue, 10 Nov 2009 23:09:27 +0100
schrieb Christian Brabandt <dug@256bit.org>:
> > Du kennst ~/.bash_history ? Passwörter landen dort eh nicht, ausser
> > du rufst weitere Programme mit Parametern auf z.B. ncftpput -u max
> > -p geheim usw.
>
> Das funktioniert aber nicht zuverlässig, wenn mehrere Sessions offen
> sind. Besser ist sowas hier:
[...]
Die History kann man auf die selbe Art und Weise flicken:
# Specify this in .bashrc
* Make Bash append rather than overwrite the history on disk:
shopt -s histappend
* Whenever displaying the prompt, write the previous line to disk:
PROMPT_COMMAND='history -a'
# A new shell gets the history lines from all previous shells.
Grüße
Michael
--
Reply to: