PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : bash eingabe loggen



emil123
01.07.03, 10:40
Weiß jemand wo die user-history abgespeichert wird

taylor
01.07.03, 10:41
In diesem Forum keine Fragen stellen! nur: Tipps und Tricks, Dokumentation, Commands, geniale Tools, Buchtips usw. Vielen Dank und viele Grüße Eicke

in ~/.bash_history

emil123
01.07.03, 10:52
hab ich überlesen mit den "keine Fragen stellen" kann ich den Thread verschieben???

Leider loggt die .bash_history erst nach dem logout, ich möchte aber gerne in echtzeit
alle Befehle meiern user überwachen

Hat jemmand ne idee ??

taylor
01.07.03, 11:07
Die bash_history loggt sofort, nicht erst nach dem Logout.

Evtl. suchst Du auch 'script'

zander
01.07.03, 11:37
Nein, ~/.bash_history wird nicht in Echtzeit aktualisiert, Auszug aus bash(1):



On startup, the history is initialized from the file named by the vari-
able HISTFILE (default ~/.bash_history). The file named by the value
of HISTFILE is truncated, if necessary, to contain no more than the
number of lines specified by the value of HISTFILESIZE. When an inter-
active shell exits, the last $HISTSIZE lines are copied from the his-
tory list to $HISTFILE. If the histappend shell option is enabled (see
the description of shopt under SHELL BUILTIN COMMANDS below), the lines
are appended to the history file, otherwise the history file is over-
written. If HISTFILE is unset, or if the history file is unwritable,
the history is not saved. After saving the history, the history file
is truncated to contain no more than HISTFILESIZE lines. If HISTFILE-
SIZE is not set, no truncation is performed.


Der Hinweis auf script ist aber bestimmt hilfreich.

emil123
01.07.03, 12:24
Danke Script ist genau das was ich gesucht habe

msi
01.07.03, 14:06
also:

ein paar regeln für das forum hier:
1. Suchfunktion beutzen bevor man postet
2. Ankündigungen lesen, dann erfährt man auch, dass hier nichts gepostet wird.