Re: Tastatureingaben per Shell mit loggen?
Hallo Dirk!
Dirk Salva schrieb am Sonntag, den 15. November 2009:
> On Sun, Nov 15, 2009 at 06:56:26PM +0100, Christian Brabandt wrote:
> > > On Sat, Nov 14, 2009 at 03:12:59PM +0100, Christian Brabandt wrote:
> > > > Dirk Salva schrieb am Freitag, den 13. November 2009:
> > > > > > * 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.
> > > > > Gibt es eigentlich eine Möglichkeit, aus parallel geöffneten Konsolen
> > > > > in die history zu loggen? Ich habe meist >3 "Tabs" in K-onsole von KDE
> > PROMPT_COMMAND ist aber der richtige Hinweis. Hänge halt noch ein
> > history -r dran. Lies halt mal help history in der Bash.
> > (und man bash *duck*)
>
> Hmm. Wo genau muss denn dieser Befehl hin? Muss ich den in die
> bash.bashrc anhängen? Oder in jeder Shell eingeben, wenn ich eine
> aktualisierte history benutzen will?
Schreib in deine ~/.bashrc oder für alle Nutzer in /etc/bash.bashrc
sowas hier:
if `echo "$PROMPT_COMMAND" | grep -vq history` ; then
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; } history -a ; history -n " ;
fi
Grüße
Christian
--
• If you have ever done any security work; and it did not involve the concept
of 'network of trust'; it wasn't security work, it was masturbation.
Linus at Google talking about GIT
Reply to: